Improve Your WordPress Email Delivery with Mandrill

As a WordPress site owner, you may use your site to send emails for a variety of reasons. Whether your site is running a contact form, product sales, or event signups, it is important that your emails make it to their intended inbox and don’t end up in the dreaded spam folder. Lucky for us, MailChimp has a free tool to help with that exact need.

Update – March, 2016: Mandrill has removed the option to use the service for free up to 12,000 emails per month, so I’ve moved to Amazon’s Simple Email Service. Check out the guide to get setup with Amazon SES here.

Improve Wordpress Email DeliveryThe Problem with WordPress Email

Almost all WordPress developers have run into problems with email delivery at one point or another. My first encounter happened a few years ago when I was building a blog carnival submission system, and certain international email providers were blocking the messages from landing where they needed to go, making my entire submission process useless about half the time.

My next encounter with email delivery issues came from my project Denver Flash Mob. I used an events plugin to create a full featured event posting and signup system, and each signup generates two messages. Thanks to the volume of emails going from my (shared) web server’s IP address to Gmail, all messages pointed to Gmail addresses were being pointed to spam.

Along the way, I learned that getting those emails to the inbox can be a bit of a challenge, and my issue was compounded because I was using an email forwarding address to send messages to my own Gmail account. Because of this, I was not getting important messages from my visitors and they were not getting the emails they signed up to receive.

Obviously, this was a serious problem for my event-based business, so I took steps to use Gmail to fetch emails rather than forward them, which reduced volume from my server’s IP to Gmail drastically. Nevertheless, that still left me in a position where most users were getting messages, but not all.

Offloading Email Delivery from Your Server

The clear answer to a problem of Gmail, or any other mail service, filtering emails from your IP is to stop sending from your IP. But unless you are a talented and experienced developer, that can pose a bit of a problem. After all, most of us don’t know how to re-route our emails through another server to improve delivery, and we don’t have another server to use that can be trusted to deliver emails as expected.

We do have a saving grace, however, as we are already using WordPress. With the open-source philosophy, any talented developer can create a solution to the email deliverability problem and give it away free or sell it as a service. Therefore, it was just a matter of time before someone was fed up enough with their delivery that they would create a more reliable method for email delivery from WordPress.

Enter Mandrill

Mandrill has nothing to do with either men or construction tools. A mandrill is a primate found in tropical and jungle climates around the world. Connecting the dots between monkeys and email, you will quickly land at MailChimp.

MailChimp is an email marketing company best known for its generous free product up to 2,000 list members or 12,000 messages per month. While I use competitor Aweber for most of my email needs, as I tested and found it has even higher delivery, MailChimp is very popular and they know what they’re doing when it comes to making email marketing easy.

While the main MailChimp service is great for mass email blasts or blog-to-email delivery, there was not a way to route individual emails through their delivery system on demand as we would need from WordPress.

The MailChimp team was up to the challenge and saw the need, so they built a new system to handle transactional email delivery, and they named it Mandrill.

Setting Up Mandrill

Getting setup with Mandrill is very easy for seasoned developers, and it isn’t too hard for people on the newer side. Any website owner should be able to follow the step-by-step instructions to set things up, but here is a basic rundown.

Step 1: Get a Mandrill Account

Your first step is to sign up for a free account at Mandrill. If you send up to 12,000 emails per month, your account stays free. If you go over that, you’ll have to pay a fee.

Once you’re signed in, head to the settings tab to grab an API key for your site.

Step 2: Install wpMandrill

Mandrill built a native WordPress plugin that will automatically offload your php emails from your server and deliver it via the Mandrill servers.

Install the app the good old fashioned way through your WordPress dashboard or download the .zip file from WordPress.org.

Step 3: Configure Mandrill in the WordPress Dashboard

When logged into WordPress, go to the new Mandrill submenu under settings on the menu bar on the left side of your screen.

Paste your API key from step two into the box on the top of the page, then add your name and email address in the next three boxes.

Hit save at the bottom. Everything should be up and running now, but you can take some extra steps to integrate even further. You can send a test email through the form at the bottom of the page to make sure it is working as expected.

Step 4: Add DNS Records (Optional, But A Good Idea)

Now that everything is working, let’s fine tune your website to work cleanly with the Mandrill API. Head back to the Mandrill site and click on the “Sending Domains” menu at the top of the screen under Domains.

Add your domain through the simple box and it will show up on the list below, but your DKIM and SPF settings are not going to be added yet. These do some technical things with your domain that you probably don’t care to know more about, but you should set them up to make sure everything is authenticated correctly and emails get even better delivery rates.

Head to your domain registrar (like GoDaddy or NameCheap) or your hosting company (like Hostgator or LiquidWeb) and find your DNS settings. Add a new TXT record with the text that pops up when you click “View DKIM settings” and “View SPF setting” at Mandrill. Hit save and click “test DNS settings” in Mandrill to make sure everything is working properly.

Next, click on “Tracking & Return Path Domains” under the same Domains menu. Enter something like track.yourdomain.com or mandrill.yourdomain.com and click the add button. Follow the same steps as above when you added TXT records, but this time add a new CNAME record named mandrill. For the CNAME value, enter mandrillapp.com. Click test to make sure it is working as expected.

Enjoy Improved Delivery

That’s it. Everything should be setup and running through Mandrill and your email delivery should improve dramatically. You can go through the other settings in WordPress or Mandrillapp.com to customize a bit more, but the most important steps are already taken care of.

Need help setting this up? I can take care of everything for you if you’re stuck or just don’t want to deal with it. Let me know through the contact form if you want the professional service many brands have come to know and trust from Narrow Bridge Media.

5 thoughts on “Improve Your WordPress Email Delivery with Mandrill”

  1. Personally I use Mandrill for all my websites. It is really easy and quality well working solution for transactional emails. Never had any problem with it. After verify with SPF/DKIM DNS records, it works excellent and all my emails finish where they belongs 🙂

  2. Thanks for your post.
    Mandrill has now a new Business Models It’s no more free.
    But Mandrill is still a very good service that provides for instance, the ability to keep hold on your self-hosted newsletter plugin and outsource only the delivering system.

Leave a Reply to Eric Rosenberg Cancel Reply

Your email address will not be published. Required fields are marked *