I have a flash template with a contact page when you put all the information in the fields and click send it says sent like everything works. After that I check my mail and there is nothing there. I have tested the webserver it is php compatible. I also created a mini test string and was able to send and recieve a test email using that small string. I'll post the action script in flash first then the php code. Id appreciate someone telling me what I'm doing wrong.
Thanks
Heres the action script in flash
Heres the php script
Thanks in advance
Thanks
Heres the action script in flash
Code:
function clearField() { txtField1.text = label1; txtField2.text = label2; txtField3.text = label3; txtField4.text = label4; txtField5.text = label5; Selection.setFocus("_focus"); } // End of the function label1 = ""; label2 = ""; label3 = ""; label4 = ""; label5 = "Message:"; countField = 5; clearField(); var arrayLabel = new Array(); for (i = 1; i < countField + 1; i++) { txtField = this["txtField" + i]; txtField.index = i; arrayLabel[i] = this["label" + i]; txtField.tabIndex = i; txtField.onSetFocus = function () { if (this.text == arrayLabel[this.index]) { this.text = ""; } // end if }; txtField.onKillFocus = function () { if (this.text == "") { this.text = arrayLabel[this.index]; } // end if }; } // end of for btnClear.onRollOver = function () { this.gotoAndPlay("over"); }; btnClear.onRollOut = btnClear.onReleaseOutside = function () { this.gotoAndPlay("out"); }; btnClear.onRelease = function () { clearField(); }; btnSubmit.onRollOver = function () { this.gotoAndPlay("over"); }; btnSubmit.onRollOut = btnSubmit.onReleaseOutside = function () { this.gotoAndPlay("out"); }; btnSubmit.onRelease = function () { if (_parent.contactform.txtField1.text == label1 || _parent.contactform.txtField2.text == label2 || _parent.contactform.txtField3.text == label3 || _parent.contactform.txtField4.text == label4 || _parent.contactform.txtField5.text == label5) { gotoAndStop(3); } else { _parent.contactform.loadVariables("email.php", "POST"); gotoAndStop(2); } // end else if }; stop ();
Code:
<?php //Type the receiever's e-mail address $emailAddress = "brian@sbsitedesigns.com"; //Type your Site Name $siteName = "SBSiteDesigns.com"; $contact_name = $_POST['name']; $contact_email = $_POST['email']; $contact_subject = $_POST['subject']; $contact_message = $_POST['message']; if( $contact_name == true ) { $sender = $contact_email; $receiver = $emailAddress; $client_ip = $_SERVER['REMOTE_ADDR']; $email_body = "The Name Of The Sender: $contact_name \nEmail: $sender \n\nSubject: $contact_subject \n\nMessage: \n\n$contact_message \n\nIP ADDRESS: $client_ip \n\n$siteName"; $emailAutoReply = "Hi $contact_name, \n\nWe have just received your E-Mail. We will get in touch in a few days. Thank you! \n\n$siteName "; $extra = "From: $sender\r\n" . "Reply-To: $sender \r\n" . "X-Mailer: PHP/" . phpversion(); $autoReply = "From: $receiver\r\n" . "Reply-To: $receiver \r\n" . "X-Mailer: PHP/" . phpversion(); mail( $sender, "Auto Reply: $contact_subject", $emailAutoReply, $autoReply ); if( mail( $receiver, "New E-Mail - $contact_subject", $email_body, $extra ) ) { echo "success=yes"; } else { echo "success=no"; } } ?>
Comment