If anyone wants to now how Not to send bulk emails, come talk to me. I recently had difficulty getting a particular clients email newsletter into their subscribers email inboxes, this costed our business a customer.
While working on the clients newsletter I decided to start from scratch to do everything I could to ensure the software and server were as valid and as transparent as possible to ensure no emails were being labelled as spam. This kicked my ass for a few days and I had some frustrations along the way. Bizarre bugs cropped up with every single test email sent. Sometimes the content displayed the HTML rather than rendering it, other times the ‘to’ name and ‘from’ name didn’t bother displaying.
Rather than more ranting about the problems, Here is a list in no particular order of the actions I took in the hopes that they will help some other company get their emails into inboxes or improve their own software.
Hosting
I Set up a new Virtual Private Server (VPS) with Blacknight - http://www.blacknightvps.com/. This provided me with a static IP address and allowed me to set up reverse DNS.
SPF Record
I Set up an SPF record for our domain name using http://www.openspf.org/.
White Lists
Requested to get our domain name listed on abuse.net
Reporting Tools
Signed up to and paid dnsstuff.com to access to their DNS testing tools. I was able to solve all problems that the reports pointed out.
Signed up to Microsoft’s Smart Network Data Services to receive data about the traffic seen originating from my IP address, such as mail volume and complaint rates.
Email headers
Added new (to me) headers to the out going emails.
Precedence: bulk
List-Id: xxxxx <yyyyy>
List-Owner: <mailto:owner@example.com>
List-Subscribe: <http://www.example.com/path/to/subscribe.php>
List-Unsubscribe: <http://www.example.com/path/to/unsubscribe.php>
List-Help: <http://www.example.com/path/to/help>
Thank you to the staff of blacknight for recommending these headers.
Existing Headers
Date: $date
To: Recipient-Name <Recipient-Email-Address>
From: Recipient-Name <Recipient-Email-Address>
Reply-To: Recipient-Name <Recipient-Email-Address>
Return-Path: Recipient-Name <Recipient-Email-Address>
Message-ID: <".time()."-Recipient-Email-Address>
X-Mailer: PHP v".phpversion()."
MIME-Version: 1.0
The position of ‘MIME-Version: 1.0′ is important. There was an excellent page about this on a site but I can’t find it now unfortunately. Some emails may not display correctly in Microsoft products such as Outlook if this header is the first header.
Reading
I read many forum posts with others also experiencing similar email marketing problems.
Referred to the SpamAssassin tests when encountering any failed tests http://spamassassin.apache.org/tests_3_2_x.html
A older blog post from Michele Neylon regarding the Do’s and Don’ts of mass emailing.
Spam assassin - tips for legitimate senders.
Spamhaus Frequently Asked Questions.
Testing
Sent test after test after test after test to myself and several other email addresses on various domains to test being labelled as false positives and layout issues.
When sending a HTML email, I was getting the PHP code to create a nice and neat text-only version. This would strip the HTML tags and then strip out all the spaces left behind. In my mind I was creating a nice and neat text version. I learned however that leaving the spaces there after trimming the HTML is best, SpamAssassin thinks the content is too different to the HTML if its trimmed back.
Sent test emails to auth-results@verifier.port25.com which provide a free automatic response. In their own words : “The service allows email senders to perform a simple check of various sender authentication mechanisms. It is provided free of charge, in the hope that it is useful to the email community.”
Wrote several custom functions to alter the layout of the emails slightly to allow the email to be displayed properly in some email domains’ web based email interfaces such as the eircom webmail interface.
When defining email headers, use ‘\n’ for line breaks on *nix servers and use ‘\r\n’ on Microsoft servers. When using the incorrect type the email headers may not display at all for some recipients.
Updated our software to send large numbers of emails in smaller chucks so as not to overwhelm anything.
Also added some helpful alerts to let a user know if they are using words or phrases that SpamAssassin doesn’t like and may lead to their email being labelled as spam.
I had problems with my ISP too, the DNS wasn’t refreshing after several days to I began using OpenDNS.org DNS details. Sadly I only found out about this close to the end of my problems but they certainly helped. At one point I couldn’t FTP into the site to make any changes at all.
Result
Our software now sends out a mean email. Unfortunately too late to convince a lost customer. Confidence is low at the moment but I will be working to continue improving the software in any way I can. I will be stricter in what the software allows a user to send out. If anyone has anything else that would help in sending emails or reporting errors, please let me know.