Migrating your Mandrill Heroku add-on to Postmark

If you’re a Mandrill customer affected by the planned shutdown of the Mandrill add-on at Heroku on April 25th, we wanted to provide a clear path for replacing it with Postmark through the Heroku Marketplace. This help document is designed to simplify the migration process, but don't forget that we also offer a detailed guide for using Postmark on Heroku.
Important: If at any point you need help or have any questions at all, please don’t hesitate to reach out to our support team either via email or live chat. We’re always happy to help.

1. Choose a Postmark Plan

Postmark offers several plans in the Heroku Marketplace ranging from 10,000 messages per month for free up to 2,000,000 messages per month for $1,000 per month. All of these plans include both sending and receiving email. Each email sent or received counts as a credit.

2. Install the Postmark Add-on

Using the Heroku CLI, you can add Postmark by running:
heroku addons:create postmark:10k

3. Confirm your sender signature

Once you’ve provisioned the add-on, you’ll need to create sender signatures to verify that you own the mailbox. It's important to note that you'll need to do this for every From address that you use.
To do this, open the Postmark Dashboard from the terminal:
heroku addons:open postmark
You can also proceed to the Postmark Dashboard from your application page on the Heroku web site. Once you’ve opened your Postmark Dashboard, navigate to the “Sender Signatures” page.
Once you’re on the Sender Signatures page, Select “Add a new Domain or Signature.”

From there, you can add a single Sender Signature to send from or add an entire domain, which will allow you to send from any email address in that domain once you have verified SPF and DKIM.

If you want to add an entire domain for sending through Postmark, choose  Add & Verify Domain. See our help article for verifying a domain for sending  hereAdd Sender Signature will prompt you to enter in information for an individual Sender Signature.

Once you click Create Signature, you’ll receive an email to confirm your Sender Signature…
Once you’ve confirmed your signature, you’ll be able to start sending from that email address.

4. Replace Your Mandrill Credentials with Postmark

In your application where you’ve configured your email sending using Mandrill’s credentials, you’ll need to change those to Postmark. So that means that you’d need to search your application for MANDRILL_USERNAME and replace it with POSTMARK_API_TOKEN. Similarly, you’d need to search for MANDRILL_APIKEY and also replace it with POSTMARK_API_TOKEN. (Just in case you’re wondering, yes, you do use POSTMARK_API_TOKEN for both values.)

5a. If sending via SMTP…

If you’re sending via SMTP, Mandrill used port 587, but with Postmark you’ll either need to use port 25 or 2525. Beyond the port changes, the exact syntax of other changes may vary slightly depending on your language or framework. You can compare Mandrill’s Heroku instructions for sending over SMTP to Postmark’s Heroku instructions for sending over SMTP.

5b. If sending via language or framework specific plugins…

If you’re sending using SMTP, you probably won’t have any application-specific code to change outside of your SMTP settings and configuration, but if you’re using a library, that may require more extensive changes to your underlying code. So we’ve put together these handy links to help you quickly see the differences…

6. Remove the Mandrill add-on

The final step to cleanup afterwards is removing the Mandrill add-on which can be done with the following command from the Heroku CLI:
heroku addons:destroy mandrill

7. Optionally, configure SPF, DKIM, and DMARC

Setting up authentication isn’t strictly mandatory, but we do recommend taking the steps to do it to ensure deliverability and security. For each domain you add you will receive a unique DKIM key to add to your DNS. We strongly recommend setting up SPF, DKIM, and DMARC to authenticate and protect your domain as well as ensure that it builds a solid reputation with ISPs.
If you’re on your Sender Signatures page already, then you’re in good shape. If not, navigate to your “Sender Signatures” page.
On that page, you’ll want to use the “Authentication” link to dive in and begin configuring the authentication for your domain:

Configuring DKIM

The first authentication step is DKIM. You don’t have to be an expert on DKIM to be able to set it up and benefit from it, but if you’d like to be an expert, we’ve written a detailed guide all about DKIM. The DKIM setup page includes a will look like this:

Configuring SPF

Next is SPF. Like DKIM, you don’t have to know the technical details of SPF to benefit from it, but if you’re not familiar with SPF and want to learn more, we’ve written a detailed guide to help explain what SPF is and how it works. The instructions you need are included, and you’ll see something like this:
Once SPF and DKIM are both verified, you can also send from any email address on that domain through Postmark.

Configuring DMARC

The final step for domain authentication is DMARC. Again, you don’t have to know all of the ins and outs to use it, but we’ve got one more great guide for you all about DMARC and how it works. The instructions are included, and it will look something like this:

Still need help? Contact Us Contact Us