My Story
I had an excuse to create my first email invitation system driven by PHP several months ago. And thanks to PHP, the learning process was effortless…
mail($To, $subject, $message);
Voila, users magically will find an invitation in their inboxes. I tested the function several times by sending messages to Yahoo Mail, Gmail, and Hotmail to see what my potential invitees would be seeing. All the emails looked fine. A few months later, I went to send an automated invitation to a hotmail friend and they never received the email. Nope, not even in their junk folder, the email vanished and I had to accept this.
Yet, I still did a little research and found that I potentially got myself blacklisted by Hotmail. Yes, only Microsoft thinks I am a massive spammer and not Yahoo or Google.
With a little more research I found that other people share my problem. Including Mxdwn.com: a site that has been serving legitimate content to thousands of people for years.
Possible Solutions
First check to see if you were black listed by sending an email from what_ever_name@your_domain.com to a Hotmail account.
If it bounces back or never arrives, chances are you’re on the list. Also, try checking your server’s error log after you send an email.*
Contact your hosting company, Hotmail, and/or your ISP to get off the list.
Pray.
Believe it or not, that’s all I found when it comes to solutions (made up the last one). Most of the dense documentation out there mainly talks about how to decrease your chances of getting black listed in the first place.
Preventive Measures
I dug up the following documentation to increase the probability of having Hotmail receive your email.*
Make sure you have an unsubscribe link in emails you send.*
Check to see if your emails may look like spam to hotmail and polish them up if they do.
Try to keep your hotmail list clean.
Make sure your DNS report looks pretty.*
Publish your SPF record*, although I also found how this did not work for one person. Note, some of this stuff can get tricky.
Make sure you have Reply-To in your mail headers and that you fully disclose where the email is coming from (discussed below) .
Ian, has one last quick simple yet effective preventive measure:
Make sure your PHP function looks like this…
$header = 'From: "Any Name" <invitation@your_domain.com>\n Reply-To: support@your_domain.com';
$additional_input = '-f your_ftp_login@your_host’s_address.com';
mail($To, $subject, $message, $header, $additional_input);
A quick way to get the your_host’s_address part is to send an email with the first function I had in this post to your own email account (not a hotmail one!).
For example, when I ran the most basic PHP mail function sending an email to my Gmail account, I received an email from nobody@montreal.dnsdc7.com.
So my email function now looks like…
$header = 'From: "'.$userName.'" <invitation@your_domain.com>\n Reply-To: support@your_domain.com';
$additional_input = '-f MyCoolFTPLogin@montreal.dnsdc7.com';
mail($To, $subject, $message, $header, $additional_input);
End Note
Test email by sending to only Gmail and/or Yahoo Mail.
* = This needs to be explained by someone in a KISS (Keep it Simple Stupid) way.
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment