- Pricing & Plans|
- Documentation|
- The Blog|
- Login
Email Best Practices¶
This is a brief summary of email best practices that we have learned. For more in depth information on best practices, we suggest checking out and following Word to the Wise. It is a great resource.
Generally, we will not focus on the content of email messages. That can be paraphrased with a few words: ‘send something people want’ (to paraphrase Y Combinator’s motto). We will focus on the infrastructure and monitoring of email so that if you are sending something people want, they will get it, and if you are not, you will know about it and hopefully fix the issue.
Reputation¶
General Advice
The most important asset you have in the email world (much like the real world) is your reputation. If you do not have a good reputation tied to your domain and your IP address (“IP” used herein for abbreviation), your email will not reach your recipients’ inboxes. Due to its popularity and its unique ability to push information to users, email has been overrun with spammers. Depending on your definition, approximately 90% of all email is spam (source: MAAWG). Due to this, email service providers (“ESPs”) like Gmail, Yahoo, MSN and Comcast have declared an all-out war on spammers. This has made our inboxes a more pleasant place to be. This also makes it very important to manage your email reputation. If it is not impeccable, you will get caught in the ESPs’ spam filters.
A good analogy for your email reputation is your personal credit score. Obviously, a bad reputation will hurt you. However, not having a reputation will also hurt you. If ESPs don’t know you (or more specifically your IP and domain) they will assume the worst and filter you, at least initially. It’s tough to blame them given all the spam out there. Due to the importance of reputation, a significant portion of our discussion on best practices revolves around building and maintaining your email reputation.
Mailgun Benefits
Mailgun’s role in this is to make sure that your infrastructure is optimized to reach the inbox. We test all of our IP’s reputation before we allocate them to customers. In addition, we set up the authentication that major ESPs require. Beyond making sure that the infrastructure is properly set up, we also give you the tools to set up and track your email for bounces, unsubscribes and spam complaints to make sure that you are complying with ESPs guidelines. This way, you can adjust your email sending to stay in their good graces.
We give you all the tools for establishing a good sending reputation, but it’s really up to you to send emails appropriately. If you follow these two simple rules, we can almost guarantee you will build up a great email sending reputation:
- Only send emails to people that have signed-up to receiving from your service (and sending a confirmation to confirm, “double opt-in”); and
- Give them the clear option to unsubscribe from emails and respect that request.
Hosting¶
General Advice
- It is important that you host your email servers in an appropriate environment. Large, virtual cloud environments are not the best environments for email for a few reasons:
- The IP address should be dedicated on a real (non-virtual) machine.
- The IP address and surrounding IP addresses should have a good reputation. This is rarely the case at large cloud environments due to their ease of use and lax monitoring (which is inviting to spammers).
- Mail Transfer Agents should ideally be on bare metal, optimized for I/O.
Mailgun Benefits
Mailgun is hosted at Softlayer on real servers. We use dedicated IP addresses in large /24 subnets. We do background checks and extensive testing on our IP addresses and because they are in large continuous blocks, they are less likely to be affected by other, external IP addresses. ESPs and blacklists occasionally block entire subnets if any of the IPs have questionable reputations. So even if your IP is clean, it might be blocked because of surrounding IPs. Larger subnets mitigate this risk.
IP Addresses¶
General Advice
If you are sending a lot of email (greater than 50k per week), it is a good idea to have a dedicated IP in order to isolate your reputation. If you are sharing your IP, you are sharing your reputation with those other senders. In addition, ESPs rate limit your emails based on the IP. So if you are a high volume sender you should consider getting a pool of IPs. However, your reputation can also be hurt if you are not sending enough volume consistently from an IP so it’s a tricky balance.
If your email sending is volatile with large spikes of volume, ESPs may assume those large spikes are spam. Also, if you overall volume is too low, they won’t acknowledge your reputation. Generally, if you are sending less than 5,000 emails per day, a shared IP may be the right solution.
- The other thing to consider is using separate IPs for your bulk and transactional mail. There are a couple reasons for this:
- Delivery of time-sensitive transactional emails may get queued behind a large batch of bulk/marketing emails.
- Your transactional mail will be affected by the reputation created by your bulk/marketing mail.
Even if you have a clean IP address, you need to warm up the IP gradually. This means sending emails at a low rate initially and then gradually increasing that rate, taking into account ESP feedback. If you send a ton of emails right away, they will get dropped by the ESPs. In some cases, they won’t even tell you they are dropping them.
Mailgun Benefits
Mailgun offers both shared and dedicated IPs. We are constantly monitoring the traffic on these IPs, so even for shared IPs, you can be comfortable that your reputation is not being unduly influenced by others. We also offer pools of IPs for high volume senders. In addition, we have queuing algorithms that gradually warm up your IPs. Our sending rates automatically increase over time as your IP warms up.
DNS¶
General Advice
Your email reputation is not only tied to your IP, but your domain name as well. You should keep this in mind as you set up your email infrastructure. For the same reasons as above, It is a good idea to have separate domains for your marketing, transactional and corporate mail. We suggest that you use your root domain for your corporate mail (hopefully your own employees aren’t clicking the spam complaint button!) and use different domains for your marketing and transactional mail. We have an FAQ’s on choosing your domain.
While it is not necessary to use the same domain in the From field of the message as the actual domain sending the message, it is a good idea. Hotmail is especially finicky about this requirement and has a higher propensity to filter your messages to junk if the two domains do not match.
You should also make sure that you are using a well regarded DNS provider and that you publish all of your contact information in the WHOIS record. If you are hiding your contact information through a proxy, ESPs may take that as a signal that you are spamming.
Mailgun Benefits
Mailgun gives you the ability to create multiple domains very easily. You are free to create a multiple domains and subdomains for each of your transactional, marketing and corporate email.
Authentication¶
General Advice
It is very important that you are using the appropriate authentication methods with your email. If you are not authenticating your email properly, ESPs will assume you are spamming and will filter or just drop your email.
The types of authentication are:
Mailgun Benefits
Mailgun uses all of these types of authentication. When you sign up for Mailgun, we provide the appropriate records for you to include at your DNS registrar. We also provide a verification button you can use to make sure that your records are set up correctly. If you are having any issues with your DNS records, please contact us.
Mailing Lists¶
General Advice
The number one reason we see people get blocked is because they have a bad mailing list. Don’t purchase your list or scrape websites for emails. It’s the easy way out and you will pay the consequences. Most of these lists have bad email addresses and include spam traps. ESPs are very good at recognizing bad mailing lists.
You should only send emails to people that have opted in to receiving your emails on YOUR website. In addition, you should be sending a verification email with a link that confirms their subscription (double opt-in) to make sure their email address is correct and that they are the person that signed up. If everyone did this, the world would be a better place.
You should have your Privacy Policy easily accessible on your website. In addition, you should have a place on your website where users can unsubscribe from your mailings, in addition to a link in every email you send (see Unsubscribe Handling).
Mailgun Benefits
While we have to rely on you to be responsible about how you procure your mailing list, we do track and give you data to easily see how your emails are being received. We give you information for bounces, unsubscribes, complaints, opens and clicks so that you can modify your mailing lists appropriately. In addition, we automate a lot of the work by keeping track of recipients that have unsubscribed, bounced or complained and stopping future deliveries to those recipients.
Bounce Handling¶
General Advise
A big part of maintaining your email reputation is processing bounces properly. In order to do this you must have the appropriate return path header included with your email so that recipients know where to reply with bounce information. In addition, you must process that information and act accordingly. If you continue to send emails to bad addresses or you do not listen to requests to slow your sending rates, ESPs will eventually block your email.
Mailgun Benefits
Mailgun automatically processes bounce information and reacts accordingly. A good portion of Mailgun’s technology is devoted to the parsing of this feedback and adjusting your sending in accordance with this feedback so that you maintain a good reputation. In addition, you can access this information through the Control Panel, the API or Webhooks. If we receive a hard bounce, we will stop sending to that address immediately. We will stop sending to an address after multiple soft bounces, according to the ESPs’ guidelines. It is possible to remove addresses from the flagged list in your control panel or through the API, in case it was a temporary issue.
Please see our User Manual for more information.
Feedback Loops and Spam Complaints¶
General Advice
Most of the major ESPs (other than Gmail) provide feedback loops through which they give you information about spam complaints. Here is a thorough list from Word to the Wise. It is important that you sign up for these feedback loops and pay attention to the feedback you are getting. If you ignore this feedback, ESPs will throttle you and eventually block you completely.
Mailgun Benefits
When you send mail through Mailgun you are automatically registered for these feedback loops. You can access this information through the Control Panel, the API or Webhooks. In addition, we process spam complaints automatically and will stop sending to email addresses after a recipient complains. It is possible to remove addresses from the flagged list in your Control Panel or through the API.
Please see our User Manual for more information.
Unsubscribe Handling¶
General Advice
It is important to give you recipients the ability to unsubscribe from emails. First, it is required by the CAN-Spam Act. Second, if you don’t give them this option, they are more likely to click on the spam complaint button, which will cause more harm than allowing them to unsubscribe. Finally, many ESPs look for unsubscribe links and are more likely to filter your email if they don’t have them.
Mailgun Benefits
Mailgun gives you the ability to include an unsubscribe link or email automatically in your email. We give you the ability to link the unsubscribe to a certain campaign or make the request global to your domain. You can access this data through the Control Panel, API or via Webhooks. In addition, we will automatically stop sending to email addresses that have unsubscribed. It is possible to remove addresses from the flagged list in your Control Panel or through the API.
Please see our User Manual for more information.
Recipient Engagement¶
General Advice
In addition to processing bounces, complaints and unsubscribes, ESPs measure your reputation through the engagement of your recipients. If recipients are opening, forwarding and replying to your emails, it will improve your reputation. This is what makes ‘do-not-reply’ emails so offensive. At many ESPs, it is also helpful if recipients add your email address to their address books.
Mailgun Benefits
Mailgun allows you to track opens and link clicks with our Tracking and Campaign functionality (see our User Manual for more information). You are free to create as many campaigns as you want and use them simultaneously for A/B testing. In addition, Mailgun is built to receive and parse emails efficiently. So there is no excuse to not allow your recipients to reply to your emails. Email is not a billboard - it is a conversant technology.
Whitelists and other deliverability tools¶
General Advice
While not required, it is a good idea to sign up for whitelists where available. Not all ESPs have them and they usually require some history of sending before they will allow you to sign up. Also, most of them require that you be on a dedicated IP address. Word to the Wise provides a list of whitelists along with feedback loops.
In addition to the whitelists provided by the ESPs, Return Path has a certification program which whitelists you at many of the major ESPs. In fact, this is the only white list that Hotmail uses. In addition, the certification enables images to be displayed by default at many ESPs (which is not usually the case). In addition to their certification, they also provide seed lists (so you can test if your email is being spam filtered) and campaign preview (to see how your emails are being rendered across ESPs and test for spammy content). You can read more about the benefits on Return Path’s website.
Mailgun Benefits
For Mailgun Pro accounts, we will automatically register you for whitelists. Also, you can set up a test inbox and use our spam filtering technology to provide a “spamicity” score for your outgoing emails so you can see their propensity for being filtered. Finally, all of our pro accounts are qualified for Return Path certification. Our technology has already been pre-vetted so the only remaining step is for them to monitor your sending in order to certify you. Contact us if you are interested.
Email Content¶
There are a few tricks to remember about content besides the mantra of ‘sending something people want’. As mentioned above, you can set up a test mailbox at Mailgun and enable our spam filters to receive a “spamicity” score to test how your content is being judged by spam filters.
- It is best to send multi-part emails using both text and HTML or text only. Sending HTML only email is not well received by ESPs. Also, remember that ESPs generally block images by default so HTML only will not look very good unless users are proactive about enabling images. There are a few tools available to test how your email will render across ESPs and browsers. Litmus offers one, as does Return Path.
- The higher the text to link ratio, the better. Too many links trigger spam flags at ESPs.
- Misspellings, spammy words (buy now!, Free!) are big spam flags, as are ALL CAPS AND EXCLAMATION MARKS!!!!!!!!!!!!!
- The from field in your emails should match the domain you are sending from. Hotmail is particularly focused on this.
- Make sure you are using unsubscribe links and headers in your emails. Many ESPs (particularly Hotmail) pay attention to this and if they are not there, you are likely to get filtered. You can always use Mailgun’s auto unsubscribe handling if you don’t want to deal with this on your end.
- Gmail pays particularly close attention to Message ID and Received headers. Message IDs that are formed incorrectly (without brackets <> and with wrong domain after @) can make Gmail think you are a spammer. The simplest way to create the right Message ID is to not set Message ID at all. Then Mailgun will create a perfect Message ID for you. Also, if you use the HTTP API, Mailgun will deal with all of this for you.
- Links should include the domain that is sending the email. Also, popular url shorteners can be a bad idea because they are frequently used by spammers.
- A/B test your emails to optimize recipient engagement. Subject lines are particularly important. You can use Mailgun’s tagging and tracking statistics in order to measure A/B testing and improve your content.
Best of luck with your emailing...we hope we made it easier!