xml web template sending blank emails. PHP problem?

  • Weddingbrushes
  • Born
  • Born
  • User avatar
  • Posts: 3

Post 3+ Months Ago

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
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • Weddingbrushes
  • Born
  • Born
  • User avatar
  • Posts: 3

Post 3+ Months Ago

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
  • raekwon2gee
  • Posts: 3

Post 3+ Months Ago

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
  • Posts: 3

Post 3+ Months Ago

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
  • Posts: 1254
  • Loc: Ro

Post 3+ Months Ago

raek, are you using AS3 or AS2?
  • raekwon2gee
  • Born
  • Born
  • raekwon2gee
  • Posts: 3

Post 3+ Months Ago

Oh! I am using AS3 with Flash CS4
  • IceCold
  • Guru
  • Guru
  • User avatar
  • Posts: 1254
  • Loc: Ro

Post 3+ Months Ago

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.
  • raekwon2gee
  • Born
  • Born
  • raekwon2gee
  • Posts: 3

Post 3+ Months Ago

Thanks Bro.
You're the best!

Post Information

  • Total Posts in this topic: 8 posts
  • Users browsing this forum: No registered users and 19 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
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.