Boinx's Blog

Stepping stone

Mandrill

Mandrill is an email service offered by MailChimp. It allows sending bulk emails and you can manage the flow of email sent via the Mandrill Dashboard.

Mandrill Home Page

images

Mandrill Dashboard

images images

So i’ve used this on a project that requires sending bulk emails to users who registered to the site, at first I’ve used the SMTP way but the problem is that sometimes when it reaches the daily quota of sending emails it will not send emails at all for the next 24 hours.

Mandrill Rates

images

I’ve registered for a free account so the monthly quota is 12k emails/month which is a decent amount of email but if you want more you can get a premium account and the rates are stated above.

Drupal Mandrill Module

I’ve used this on a Drupal site and there’s a drupal module that’s currently available for use. Here’s the link for it.(Current stable version is for Drupal 7)

Requirements for this module to work:

Once you’ve follow the step on installing and enabling the module,you can now configure your mandrill app by going to modules and finding Mandrill then click on ‘Configure’.

images

You’ll be redirected on the Mandrill page of your drupal site and it will now ask for an API Key.

images

To get an API key, register an account on Mandrill.Once registered, login and click on ‘Settings’. You will find there the ‘Create API Key’ button. Click that to create a new API key, you can fill up the Description and check the checkboxes based on how you’ll use it but you can leave it all blank and unchecked.

images images

Once you get the API key you can now paste it on the API key field on your Mandrill app page on your drupal site and continue configuring it.

  • From address - will be the email address used to send the emails. You can use any email address.
  • From name - you can optionally put here a name to be used as the sender of the email.
  • Input format - you can choose the format of your email. (Filtered HTML, Full HTML and Plain text)

images

images

images

Once you’ve set up everything, you can test out if your Mandrill can now send emails. You can click on the ‘Send Email’ tab on the tabs above.

images

Fill in the email address you want to receive an test email and you can edit the contents. Include attachment checkbox will Include a drupal icon attachment to the email when checked.

images

This is what the sent email looks like:

images

One last step is to set all the email functions to use the Mandrill App, go to Modules again and find ‘Mail System’ then click ‘Configure’.

images

images

You just have to make sure that the ‘Site-wide default MailsystemInterface class’ is set to MandrillMailSystem and you’re all good. All the outbound emails will now be sent through Mandrill. Congratulations! You’ve set up your Mandrill App on your Drupal site.

You can keep track of your Mandrill App via the Mandrill Dashboard on your Drupal site. Go to reports > Mandrill.

images images