Ludo DS Posted October 5, 2009 Share Posted October 5, 2009 Dear, I'd like to send a mail to my hotmail adres but it doesn't work. I changed the variable to my gmail account and that works. Are there any headers I can use to solve this problem. Or? Thanks in advance. <?php $sentto = "koen"; $email = "michael.kelso@live.com"; $subject = "You have mail"; $message = "Hello $sentto, You have mail waiting for you. //This is where the body of my message would be Thank you, K. This is an automated response, please do not reply."; mail($email, $subject, $message,"From: Live.com <happyholidaysyoubastard@hotmail.com>\nX-Mailer: PHP/" . phpversion()); echo "<b>Naam: </b>"; echo " $sentto"; echo "<br>\n"; echo "<b>E-mail: </b>"; echo " $email"; echo "<br>\n"; echo "<br>\n"; echo "<br>\n"; ?> Quote Link to comment https://forums.phpfreaks.com/topic/176534-solved-sent-mail-to-hotmail-trough-php/ Share on other sites More sharing options...
Bricktop Posted October 5, 2009 Share Posted October 5, 2009 Hi Ludo DS, It's probably ending up in your SPAM folder, have a look at this thread for some useful information though http://www.phpfreaks.com/forums/index.php?topic=135713. Hope this helps. Quote Link to comment https://forums.phpfreaks.com/topic/176534-solved-sent-mail-to-hotmail-trough-php/#findComment-930576 Share on other sites More sharing options...
Ludo DS Posted October 5, 2009 Author Share Posted October 5, 2009 Hey! I can't add an mx record because my host doesn't allow this. Checked in the spam folder but saw nothing. Can't this be solved without the SPF record and just by sending know headers? Thanks in advance. Quote Link to comment https://forums.phpfreaks.com/topic/176534-solved-sent-mail-to-hotmail-trough-php/#findComment-930593 Share on other sites More sharing options...
PFMaBiSmAd Posted October 5, 2009 Share Posted October 5, 2009 You are putting a @hotmail.com address into the From: address. Hotmail knows that you are not sending the email from a hotmail mail server and is discarding it. You need to put a valid email address host at the sending mail server into the From: address. Quote Link to comment https://forums.phpfreaks.com/topic/176534-solved-sent-mail-to-hotmail-trough-php/#findComment-930636 Share on other sites More sharing options...
Ludo DS Posted October 5, 2009 Author Share Posted October 5, 2009 Thank you so much. It works now. Thank you! You're very good in what you do. Quote Link to comment https://forums.phpfreaks.com/topic/176534-solved-sent-mail-to-hotmail-trough-php/#findComment-930649 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.