dbe1800 Posted March 3, 2010 Share Posted March 3, 2010 Hello all, i need help with my coding for my contact page... im using flash and action script 3 the site is the5150crew.com - Contact Page below i put my email.php code notice any errors? when i test my file i get no errors but the email does not go thru... <?php $emailRecipient = "[email protected]"; $emailHeaders = "From: [email protected]\r\nContent-type: text/html\r\n"; $emailHeaders = "Reply-To: " .$_POST["userEmail"]. "\r\n"; $emailHeaders = "\r\n"; foreach ($_POST as $key => $value) { $$key = stripslashes($value); } $emailBody = "<HTML> <BODY> <TABLE BORDER='1'> <TR> <TD align='left' width='780'>Email : ".$userEmail."</TD> </TR> <TR> <TD align='left' width='780'>Name : ".$userName."</TD> </TR> <TR> <TD align='left' width='780'>Message: <br><br>".$userMessage."</TD> </TR> </TABLE> </BODY> </HTML>"; if(mail($emailRecipient, "admin Form\n\n", $emailBody, $emailHeaders)){ echo "var1=success"; } else { echo "var1=failure"; } ?> Link to comment https://forums.phpfreaks.com/topic/194026-help-with-php-coding/ Share on other sites More sharing options...
jcanker Posted March 3, 2010 Share Posted March 3, 2010 I don't see anything glaring at me, but mail can be difficult to troubleshoot because now it's not just your php code that can be a factor. It's too much to give you a full flow chart, but here are some basic areas to troubleshoot: First of all, put the php code on a page outside of the flash script. Does it give you the success or failure message? (or none at all?) Check the email server: Does it show the incoming connectivity? If not are php.ini mail settings configured properly? Is the email server on the same LAN/VLAN segment as the php server and behind the same firewall? Is your mail server configured to allow your php server to relay messages? Link to comment https://forums.phpfreaks.com/topic/194026-help-with-php-coding/#findComment-1021013 Share on other sites More sharing options...
teamatomic Posted March 3, 2010 Share Posted March 3, 2010 $$key = stripslashes($value); HTH Teamatomic Link to comment https://forums.phpfreaks.com/topic/194026-help-with-php-coding/#findComment-1021039 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.