Xero000 Posted January 22, 2009 Share Posted January 22, 2009 Hi I'm new to PHP and i'm trying to create a submit form ina flash doc and have php email that info to my account. All the vars are passing to the php just fine as it displays in the echo... i however can not for the life of me get the mail($sendto... function to work. Could all you well versed in PHP help me out? I'd very much appreciate it. here's my code: <?php $sendto = '[email protected]'; $subject = ' test '; $headers = "From: [email protected]"; $headers .= "Reply-To: " . $_POST["fromname"] . "\n\n"; $headers .= "Return-path: " . $_POST["fromemail"]; $message = $_POST["frommessage"]; mail($sendto,$subject,$message,$headers); echo $sendto,$subject,$message,$headers ?> Link to comment https://forums.phpfreaks.com/topic/142026-sending-email-with-php-from-flash-having-problems/ Share on other sites More sharing options...
trq Posted January 22, 2009 Share Posted January 22, 2009 How do you know its not sending? <?php $sendto = '[email protected]'; $subject = ' test '; $headers = "From: [email protected]"; $headers .= "Reply-To: " . $_POST["fromname"] . "\n\n"; $headers .= "Return-path: " . $_POST["fromemail"]; $message = $_POST["frommessage"]; if (mail($sendto,$subject,$message,$headers)) { echo "mail called succesfully!"; } else { echo "Call to mail() failed"; } ?> Link to comment https://forums.phpfreaks.com/topic/142026-sending-email-with-php-from-flash-having-problems/#findComment-743672 Share on other sites More sharing options...
Xero000 Posted January 22, 2009 Author Share Posted January 22, 2009 Yes, i've tried this. It does echo 'call to mail() failed' I'm fairly confused. I'm pretty sure it's coded correctly... but i could be wrong. could it be a server issue? Thoughts? oh and i forgot to say i know it's not sending because I'm not receiving any emails. it seems like the rest of the code is worknig. just not mail() Link to comment https://forums.phpfreaks.com/topic/142026-sending-email-with-php-from-flash-having-problems/#findComment-743678 Share on other sites More sharing options...
Xero000 Posted January 22, 2009 Author Share Posted January 22, 2009 also, this is being hosted on godaddy. I'm uncertain of their server could be causing the hiccup or if it's my doing. Link to comment https://forums.phpfreaks.com/topic/142026-sending-email-with-php-from-flash-having-problems/#findComment-743697 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.