xml web template sending blank emails. PHP problem?

  • Weddingbrushes
  • Born
  • Born
  • User avatar
  • Joined: Aug 20, 2009
  • Posts: 3
  • Status: Offline

Post August 21st, 2009, 1:37 pm

I recently built a site using an xml flash template. I am using Flash CS4. I muddled through well enough until I got to the mailer.php file. All it seemed like I needed to do was insert my email into the right spot so the contact form on the site would send me mail from clients. I did this and now only recieve emails that are blank from undefined senders. I do receive a unique IP address from each client in my message body, but, I really don't know how to reply to those. :?

I have already tried some other simple generic php mail files that have even been mentioned in these forums. I am very much of a novice in this area but I wonder if the php file that came in my package was just thrown in and not unique to my template? It came with a flash email form that is different than the one intrinsic to my template. I searched through my files and found one "contactform.as" that makes mention of "mailer.php". Other than that, I don't know where else to look to make any changes.

my site is http://www.weddingbrushes.com
And here is the unadulterated php file I got. The only thing I changed is the "send to" address. You can see why I get the IP addresses and I get "contact form undefined" in my subject line. But, why do I get nothing the user types in?

Code: [ Select ]
<?php
 
/* ---------------------------
php and flash contact form.
by http://www.MacromediaHelp.com
---------------------------
Note: most servers require that one of the emails (sender or receiver) to be an email hosted by same server,
so make sure your email (on last line of this file) is one hosted on same server.
--------------------------- */
 
 
// read the variables form the string, (this is not needed with some servers).
$subject = $_REQUEST["subject"];
$message = $_REQUEST["message"];
$sender = $_REQUEST["sender"];
 
 
// include sender IP in the message.
$full_message = $_SERVER['REMOTE_ADDR'] . "\n\n" . $message;
$message= $full_message;
 
// remove the backslashes that normally appears when entering " or '
$message = stripslashes($message);
$subject = stripslashes($subject);
$sender = stripslashes($sender);
 
// add a prefix in the subject line so that you know the email was sent by online form
$subject = "Contact form ". $subject;
 
// send the email, make sure you replace email@yourserver.com with your email address
if(isset($message) and isset($subject) and isset($sender)){
    mail("email@yourserver.com", $subject, $message, "From: $sender");
}
?>
  1. <?php
  2.  
  3. /* ---------------------------
  4. php and flash contact form.
  5. by http://www.MacromediaHelp.com
  6. ---------------------------
  7. Note: most servers require that one of the emails (sender or receiver) to be an email hosted by same server,
  8. so make sure your email (on last line of this file) is one hosted on same server.
  9. --------------------------- */
  10.  
  11.  
  12. // read the variables form the string, (this is not needed with some servers).
  13. $subject = $_REQUEST["subject"];
  14. $message = $_REQUEST["message"];
  15. $sender = $_REQUEST["sender"];
  16.  
  17.  
  18. // include sender IP in the message.
  19. $full_message = $_SERVER['REMOTE_ADDR'] . "\n\n" . $message;
  20. $message= $full_message;
  21.  
  22. // remove the backslashes that normally appears when entering " or '
  23. $message = stripslashes($message);
  24. $subject = stripslashes($subject);
  25. $sender = stripslashes($sender);
  26.  
  27. // add a prefix in the subject line so that you know the email was sent by online form
  28. $subject = "Contact form ". $subject;
  29.  
  30. // send the email, make sure you replace email@yourserver.com with your email address
  31. if(isset($message) and isset($subject) and isset($sender)){
  32.     mail("email@yourserver.com", $subject, $message, "From: $sender");
  33. }
  34. ?>


Thanks!
Moderator Remark: Added [code] tag
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post August 21st, 2009, 1:37 pm

  • Weddingbrushes
  • Born
  • Born
  • User avatar
  • Joined: Aug 20, 2009
  • Posts: 3
  • Status: Offline

Post August 22nd, 2009, 10:55 am

I contacted the template help again and they gave me new .php,.as, and .swf files that seem to have done the trick.
  • raekwon2gee
  • Born
  • Born
  • No Avatar
  • Joined: Aug 28, 2009
  • Posts: 3
  • Status: Offline

Post August 28th, 2009, 1:43 pm

Hey buddy!
PLEEASE, I have been waiting for this kind of post for so so long.
I have been trying to create a Flash CS4 and PHP app that sends emails for the longest and all to no avail.
If you could please, just send me the entire code for both the flash and the PHP, that would make me feel like I am in heaven and you would have done one of the greatest things ever my mankind.
  • Weddingbrushes
  • Born
  • Born
  • User avatar
  • Joined: Aug 20, 2009
  • Posts: 3
  • Status: Offline

Post August 30th, 2009, 7:01 pm

Hey,

It looks like the flash form and php came from "macromediahelp" . I can't seem to post the flash code but it is a free download at that site. My problem was with the actionscript file, when the template help dept. sent me a new one everything seemed to work. I hope that helps, because that is about the extent of my knowledge on the subject.
  • IceCold
  • Guru
  • Guru
  • User avatar
  • Joined: Nov 05, 2004
  • Posts: 1254
  • Loc: Ro
  • Status: Offline

Post August 31st, 2009, 7:29 am

raek, are you using AS3 or AS2?
“True mastery transcede any particular art. It stems from mastery of oneself - the ability, developed throgh self-discipline, to be calm, fully aware, and complety in tune with oneself and the surroundings. Then, and only then, can a person know himself. ”
  • raekwon2gee
  • Born
  • Born
  • No Avatar
  • Joined: Aug 28, 2009
  • Posts: 3
  • Status: Offline

Post September 1st, 2009, 12:52 am

Oh! I am using AS3 with Flash CS4
  • IceCold
  • Guru
  • Guru
  • User avatar
  • Joined: Nov 05, 2004
  • Posts: 1254
  • Loc: Ro
  • Status: Offline

Post September 1st, 2009, 4:56 am

here is a class for sending mail, also with the test files.
http://www.awake.ro/test/testmail.zip (copy the link and paste it in browser, direct click will probably fail). It's tested and working.
“True mastery transcede any particular art. It stems from mastery of oneself - the ability, developed throgh self-discipline, to be calm, fully aware, and complety in tune with oneself and the surroundings. Then, and only then, can a person know himself. ”
  • raekwon2gee
  • Born
  • Born
  • No Avatar
  • Joined: Aug 28, 2009
  • Posts: 3
  • Status: Offline

Post September 1st, 2009, 6:41 am

Thanks Bro.
You're the best!

Post Information

  • Total Posts in this topic: 8 posts
  • Users browsing this forum: No registered users and 34 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.