Using Mandrill for Your Site Transactional Email

Using Mandrill for your Site Transactional Mail

First you need an account at mandrill .

Once you sign up, the next screen asks if you want to use SMTP or API method. With the API method, you have more control so that is how mine is set up.

It’s best to set up an app for each domain you have, in case you have more than one domain.

This is where to set up the API keys, Mandrill Settings .

Click Add API Key

It immediately adds one but you are not done. On the right click Edit for this API key.

Add a description, I use my site name so that I know what this key is for.

Now also under the description click the check box for:

Only Allow This Key To Use Certain API Calls

Now click the check box at the top of the Message column and it will check all of the things under Messages. This is for extra security.

makdrill api key edit

At the bottom left click to Save Edits.

Make a key for each domain you have.

Once you have your API keys, if you have more than one domain, you would want to make a subaccount for each one including your main site. You can skip this step if you only have one domain.

To make a subaccount go here, Mandrill Subaccount .

Click Create a Subaccount

Make your subaccount ID something relevant. I use the sitename

Now you will see this account has it’s own quota and reputation. This is a very nice feature and you’ll see why as time goes by.

Once you make all of your subaccounts, you need to make a rule for each one, noting to put the proper ID for each rule.

Click to Add Rule

Make a relevant rule name. Again I use the site name.

mandrill rules

Set it up like the screen shot shows. It will go for the API for this domain, and the subaccount for this domain. This will have any mail set for the proper domain and filter it accordingly.

Be sure to submit it when done.

Make a rule for each subaccount.

You can also add an unsubscribe link to the footer of your emails that go out, right through the Mandrill settings and Mandrill takes care of everything!

To automatically add an unsubscribe, go here, and near the bottom you will see a checkbox to add unsubscribe. Click it and save and now your users can click to unsubscribe from any and all site emails.

mandrill unsubscribe

Now you have your app set up on Mandrill for the most part.

You can set the SPF and DKIM records which make it even more reliable for delivery.

You’ll see any domains here that send from your mandrill account. Stuff is added automatically to it if the sender is your domain.

When you first set this up though, no domains will be there. You can add your domain manually by clicking to Add Domain.

Once your domain (s) is in the sending domains page, you will notice two columns – DKIM Settings and SPF Settings which will show as a red x and missing until you have your server folks change the settings. Just click on each one to see what to send to your host to change. This is not mandatory but it does help and is recommended to do for each domain.

On this same screen is a Verify Domain at the top right. Click that and verify each domain you want to, as an extra measure of protection for your account reputation.

A few tips:

1. At Mandrill, if you don’t want your user name to be your email address, just click to the left of the gear at the top right of the screen and edit your account. (it will be a drop down where you see your current user name).

2. Explore Mandrill as it has tons of cool features.

3. Don’t use it for a newsletter right away as there is a warm up period and you can see your current reputation as well as your mail quota on the dash page. Be sure to check each domain you set up too if you have subaccounts. Let your account get a good reputation and good quota before sending newsletters.

4. Check your bounces each day or at least every few days, don’t wait longer than a week to check your bounces. If you find mail bouncing back, go in your user settings in your site admincp and look for that user with the bounces. Change their settings in the user edit screen so they don’t get any site notifications so that your bounce rate will go back down. It’s important to keep up with bounces if you want a good reputation.
5. If you are getting errors for “could not authenticate” please follow this tip:

That is correct. CSF is a firewall, you need to add 587 in TCP port whitelist for outgoing.

From this thread SMTP Errors.

This is a great tool to use for site email but if abused, it will bite you as you will lose your account. Make sure you don’t allow this to ever be used for spamming activities.

Content Protection by