$body = \'This is a test\';
$subject = \'Confirmation\';
$headers = \'From: Testing Site\' . \"\\r\\n\";
$headers .= \'Reply-To: admin@myserver.com\' . \"\\r\\n\
1 ) Go to SPF record wizard
2) create a new SPF record for your DNS domain
3) Add that DNS record to your domain's DNS
4) if you fail somewhere in the process, read the detailed SPF record specification
After you complete this process HOTMAIL will be happy with your email.
The From
header is invalid. It must have the following syntax:
From: "name" <email-address>
In your case:
From: "Testing Site" <admin@myserver.com>
The same goes for your Reply-To
header:
Reply-To: "Testing Site" <admin@myserver.com>
Which you can omit if it's the same as the From
header (like in your case).
PS: RFC 2822 doesn't state that the display-name in an address should be quoted. In other words: the following 3 headers should all work:
From: "Testing Site" <admin@myserver.com>
From: 'Testing Site' <admin@myserver.com>
From: Testing Site <admin@myserver.com>
If you're using WordPress, you can look up plugin for Hotmail/Outlook friendly emailing capability.
However if it is a standalone script you might wanna look into Microsoft's official answer to this query on the URL : http://answers.microsoft.com/en-us/outlook_com/forum/oemail-osend/why-are-the-emails-sent-to-microsoft-account/b64e3e4a-0d93-40c8-8e28-4be849012f9c
In-short Email-Server provider has to fill this form (once) : https://support.live.com/eform.aspx?productKey=edfsmsbl3&ct=eformts&wa=wsignin1.0&scrx=1
In order to get their emails accepted by Hotmail/Outlook.
Using the PHPMailer library to send mail instead of the mail() function has finally sorted this problem and is the working solution for me. Answer by Jasper N. Brouwer probably more correctly answers the question though I've not had a chance to try it.