Sending mails from php’s mail() to Hotmail
This is a known issue, and there is a known solution, but it's hard to find when you really need it.
When you're sending an e-mail from php mail() to a Hotmail account, most of the times it will a) never arrive or b) get marked as spam. There is a fix though: you need to send some extra headers with the request, make it look like it was sent from a real mail client.
<?php
$to = "I Ron <iron@hotmail.com>";
$subject = "It arrived on Hotmail?";
$message = "Yes it did! :o";
$headers = "From: RandomBase <iron@randombase.com>\n";
$headers .= "MIME-Version: 1.0\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\n";
$headers .= "Reply-To: RandomBase <iron@randombase.com>\n";
$headers .= "X-Priority: 1\n";
$headers .= "X-MSMail-Priority: High\n";
$headers .= "X-Mailer: RandomBaseMailer";
mail ($to, $subject, $message, $headers)?>
It's that simple. It would be even more simple if people stopped using this piece of AJAX based spyware that filters everything but spam messages.
