apologies if this is in the wrong section but I need some help with my php script.
When submitting the form on the flash file, I get a message that the mail has been sent successfully but no email turns up. Everything used to work perfectly but when my I stopped receiving emails, I thought I would test things out.
Here's the action script code on the submit button:
on (rollOver) {
this.gotoAndPlay("s1");
}
on (releaseOutside, rollOut) {
this.gotoAndPlay("s2");
}
on (release) {
if (this._parent.your_name eq "Name:" or this._parent.your_email eq "E-mail:" or this._parent.telephone eq "Phone:" or this._parent.message eq "Message:") {
this._parent.EmailStatus = "Please fill in all of the required fields....";
}
else if (!this._parent.your_email.length || this._parent.your_email.indexOf("@") == -1 || this._parent.your_email.indexOf(".") == -1) {
this._parent.EmailStatus = "Please enter a valid E-mail address....";
} else {
this._parent.EmailStatus = "Sending message. Please wait....";
sender_name = this._parent.your_name
sender_email = this._parent.your_email
sender_phone = this._parent.telephone
sender_message = this._parent.message
loadVariables("/Scripts/sendmail.php",this,"POST");
}
}
And here's my php script:
<?
$sender_email = $_POST['sender_email'];
$sender_phone = $_POST['sender_phone'];
$sender_message= $_POST['sender_message'];
$sender_name= $_POST['sender_name'];
$ToEmail = "my@email.address";
$ToName = "My Name";
$ToSubject = "$sender_name has sent you a message from your website";
$EmailBody = "\nEmail: $sender_email\nPhone Number: $sender_phone\nMessage: $sender_message";
$EmailFooter="\n";
mail($ToName." <".$ToEmail.">",$ToSubject, $EmailBody, "From: ".$sender_name." <".$sender_email.">", '-f my@email.address');
Print "_root.cont.cont2.txt.EmailStatus= Message sent successfully. Thank you :)";
?>
I've changed the email address in the php code.
As I said previously, all appears to work perfectly. If I omit fields from the contact form, the action script comes up with the message to tell me to complete all fields or use a valid email address and when the form is complete, it seems to communicate with the php script as I get the message that it was sent...but still no email.
If someone here can advise me on anything to check, that would be cool.
Question
nickster_uk
Hi..
apologies if this is in the wrong section but I need some help with my php script.
When submitting the form on the flash file, I get a message that the mail has been sent successfully but no email turns up. Everything used to work perfectly but when my I stopped receiving emails, I thought I would test things out.
Here's the action script code on the submit button:
on (rollOver) { this.gotoAndPlay("s1"); } on (releaseOutside, rollOut) { this.gotoAndPlay("s2"); } on (release) { if (this._parent.your_name eq "Name:" or this._parent.your_email eq "E-mail:" or this._parent.telephone eq "Phone:" or this._parent.message eq "Message:") { this._parent.EmailStatus = "Please fill in all of the required fields...."; } else if (!this._parent.your_email.length || this._parent.your_email.indexOf("@") == -1 || this._parent.your_email.indexOf(".") == -1) { this._parent.EmailStatus = "Please enter a valid E-mail address...."; } else { this._parent.EmailStatus = "Sending message. Please wait...."; sender_name = this._parent.your_name sender_email = this._parent.your_email sender_phone = this._parent.telephone sender_message = this._parent.message loadVariables("/Scripts/sendmail.php",this,"POST"); } }And here's my php script:
I've changed the email address in the php code.
As I said previously, all appears to work perfectly. If I omit fields from the contact form, the action script comes up with the message to tell me to complete all fields or use a valid email address and when the form is complete, it seems to communicate with the php script as I get the message that it was sent...but still no email.
If someone here can advise me on anything to check, that would be cool.
Thanks for reading :)
Link to comment
Share on other sites
3 answers to this question
Recommended Posts