How To: 100% Trouble Free Email for WordPress with Mailgun

By 6th August 2015 July 22nd, 2017 iControlWP Updates, WordPress News and Updates
Update [2016/04/20]: Since the announcement that MandrillApp will be discontinued, we’ve moved to Mailgun instead. The article still applies, but wherever Mandrill is mentioned, replace with Mailgun.

In this article we’ll lay out the most reliable method for email delivery on WordPress.

Most of WordPress sites are, unfortunately, hosted on mass-market, poorly configured web hosts. The most recent issues I’ve seen were on Godaddy. These web hosts either:

  • aren’t configured properly to send email, or
  • block email sending (SMTP) by default as a precautionary measure against SPAM relays

So what’s your solution? It might sound a little crazy: Email that doesn’t use SMTP.

We’re going to show you how to do it in 3 easy steps.

Before You Start

Before doing any of this, you must be aware of the following points. If you ignore this, you will eventually run into trouble:

  • MandrillApp is free for up to 2000 email sends per month. If you think you’ll exceed this level, this isn’t for you – though the pricing is very reasonable.
  • Disable any other plugin on your WordPress sites that handles email. There can be only one.

Stage 1: Setup a free MandrillApp account and verify your domain

MandrillApp is a transactional email service from the same provider as Mailchimp.

MandrillApp Settings: Menu Sending Domains

MandrillApp Sending Domains

  1. Sign-up for MandrillApp
  2. Add your domain as a permitted sending domain by Mandrill (see screenshot right)
  3. Verify your sending domain (follow their instructions within the sending domains screen)
  4. [Optional but highly advised] You should add the DKIM and SPF records to reduce the chances that your emails are marked as SPAM.

Stage 2: Create an API key for your websites

MandrillApp Settings: API Keys

MandrillApp Settings: API Keys

  1. From the Settings sub-menu, select the SMTP & API Info item
  2. Click the blue button to create a new API Key
  3. Give your API key a description so you’ll recognize it later
  4. Make a note of the API key that was generated to use in the following stage

Stage 3: Install the wpMandrill plugin on your WordPress site(s)

The final piece of the puzzle is to install the WordPress plugin that will send emails from your Mandrill account.

This plugin is a little rough around the edges, but it works when you have the fields properly filled in.

  1. Log into your WordPress admin area and click to add a new plugin
  2. In the search field, type: wpmandrill, and press enter
  3. Click to install and then active the first plugin in the search results
  4. In your list of installed plugins look for wpMandrill and click on the Settings link below the plugin title.
  5. In the next screen paste in the API key you noted down in part 4 of the previous Stage 2; click Save.
  6. The setting screen will show more options for your email preferences which you should fill in.
  7. Once you’re happy, save your changes.

[BONUS!] Stage 4: Send A Test Email

At the bottom of the settings page for wpMandrill, there is a test email button. Use this.  Now.

Ensure that your configuration is working before leaving.  If it’s not, or you have doubts, disable the wpMandrill plugin. No harm done.

100% Trouble Free WordPress Email

This should have taken around 5-10 minutes to complete, but for every site you add going forward, it’ll take you about 2 minutes each time.

Not only does this give you reliable email that by-passes your web host’s SMTP restrictions, it gives you insight into the deliverability of your emails using MandrillApp’s dashboard.

Other Suggestions?

If you have other suggestions on how to achieve trouble free, non-SMTP email on your WordPress sites, I’d love to hear it.  Please leave your comments below!

Join the discussion 5 Comments

  • Roy Randolph says:


    Thanks for this WordPress email tip, going to have to try it.

    I have been setting up WordPress emails using our 3rd party system, while good, it does limit the number of emails per day.

    I will have to give this a try.

    ~ Roy

    View Comment
  • LynnW says:

    Yes, I was having trouble with one site’s email sends from the shopping cart. I installed the Mandrill plugin, and it solved the problem. I wish I’d come across your post before installing it, though, because you’ve done a great job of describing the problem and the steps to fix it, both why and how. Thanks, guys!

    View Comment
  • Bo Lais says:

    For anyone unaware there have been significant Mandrill Policy Changes as of yesterday (Feb. 24, 2016) that require a paid Mailchimp account in order to use Mandrill any longer. There is chaos stirring on the internet regarding this very bold decision by Mandrill yesterday. Additionally, they gave everyone a very short notice to get moved to another provider before your account will be terminated for non-compliance.

    View Comment
    • Paul G. says:

      Yea, we got the same notice too and have been reviewing our options. We will probably update this or put together a supplement article to cover this once we finish our review and decide on our next step forward.
      I understand why they’d do what they’re doing, but that still doesn’t make it easy for us all to switch around.

      Thanks for reporting this.

      View Comment

Leave a Reply

x Logo: ShieldPRO
This Site Is Protected By