Schlo_50 Posted September 24, 2008 Share Posted September 24, 2008 Hey guys, Im trying to send some mail using php mail(). My script is successful when sending to all addresses apart from hotmail ones. <?php if (isset ($_POST['submit'])) { $site = "[email protected]"; $name = $_POST['name']; $number = $_POST['number']; $flag = "yay"; $error = ""; if ($number == ""){ $msg = $msg."Please enter your nunmber.<br />"; $flag = "nay"; } if ($flag <> "yay"){ echo "$msg <br /> <input type='button' value='Retry' onClick='history.go(-1)'>"; }else{ $subject = "Enquiry"; $messagebody = " Name: $name Phone: $number _______________________ "; $headers = "From: [email protected]\n"; $headers .= "MIME-Version: 1.0\n"; $headers .= "Content-type: text/html; charset=iso-8859-1\n"; $headers .= "Reply-to: me <[email protected]>\n"; mail($site, $subject, $messagebody, $headers); echo "Thank-you for your enquiry. We will get back to you soon!"; } } ?> Any ideas? Thanks in advance Link to comment https://forums.phpfreaks.com/topic/125608-hotmail-hates-php/ Share on other sites More sharing options...
PFMaBiSmAd Posted September 24, 2008 Share Posted September 24, 2008 Do the DNS records at the domain in the From: address contain a valid SPF record that says that the sending mail server is authorized to send mail for that domain? Link to comment https://forums.phpfreaks.com/topic/125608-hotmail-hates-php/#findComment-649410 Share on other sites More sharing options...
Schlo_50 Posted September 24, 2008 Author Share Posted September 24, 2008 OK, so i've tried to figure out how I can test the sender policy framework to see if it's valid but still no idea how. Could you please tell me how to test this? Thanks Link to comment https://forums.phpfreaks.com/topic/125608-hotmail-hates-php/#findComment-649426 Share on other sites More sharing options...
Schlo_50 Posted September 24, 2008 Author Share Posted September 24, 2008 Don't worry, My reading has finally paid off. Found what im after. Thanks for the tip. I'll post back if it doesn't work. Link to comment https://forums.phpfreaks.com/topic/125608-hotmail-hates-php/#findComment-649429 Share on other sites More sharing options...
kenrbnsn Posted September 24, 2008 Share Posted September 24, 2008 Please post what you found that solves the problem. Many people have similar problems and your solution may work for them also. Ken Link to comment https://forums.phpfreaks.com/topic/125608-hotmail-hates-php/#findComment-649443 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.