Blog/ Send Drupal's Transactional Emails using Mandrill

In this video, we will show you how to integrate Drupal with Mandrill to sent transactional emails. Mandrill is an application developed by Mailchimp, which allows you to sent transactional emails and get the analytics, such as open rate and click rate.

 

 

 

 

 

 

 

 

First create an account at http://mandrillapp.com or login if you already have one. On logging in, you will see the dashboard. Click on SMTP and API Credentials.

 

The next page shows you the hostname, SMTP port number, username and password. The password is any valid API key. Click on Add API Key.

 

Mandrill will generate an API key for you.

 

You'll need this key later while configuring Drupal's Mandrill module. Go to the modules page of your Drupal installation. You will see that there are four modules within the Mandrill module: Madrill,  Mandrill template, Mandrill Reports and Mandrill Activity. In this article, we will go over the Mandrill module only. We will cover the remaining modules in other articles. Enable the Mandrill module. Mandrill requires mailsystem module, so it will enable that as well.

 

Next step is to configure the module. Go to the Mandrill module configuration page at /admin/config/services/mandrill. Get the API key that you generated in http://mandrillapp.com and fill it in the configuration form. After saving it, the page shows you other options that you need to configure. Follow the screenshots below to configure them.

 

Now you will need to configure the mailsystem module. Go to /admin/config/system/mailsystem. Configure Site-wide default mailsystem to use the MandrillMailSystem.

 

Now, the Drupal is configured to send email via Mandrill. So, let’s test it out. Let’s go back to Mandrill configuration page at /admin/config/services/mandrill. Verify that the default system is the Mandrill mail system. The click on Send Test Email.

 

Enter your email id and send a test mail. Check your inbox. You should have got an email from Drupal via Mandrill! If you go to the dashboard in http://mandrillapp.com, you will see the log of this email similar to what you see below.

 

Comments

By Juc1 (not verified) Wednesday, December 3, 2014 - 02:01 Permalink

Excellent instructions - thank you. But I don't think you mentioned the Mandrill library?

By paul (not verified) Tuesday, March 10, 2015 - 13:18 Permalink

Great documentation and video walkthrough of setting up mandrill. I wanted to follow up and see if you have any information on mandrill activities that you can share. We are having difficulty figuring out how to implement this feature. Ideally we would like to have information like reads and clickthroughs available to associate with a user's email address and displayed using views. Is this possible?

By Sunil (not verified) Friday, January 22, 2016 - 15:48 Permalink

Thanks for the such a good documentation. It helped me a lot. Can you please share some article on Mailchimp,Sailthru and Mailchimp vs Mandrill also?

 
Ready to get started?REQUEST A QUOTE