Postmark to Mailtrap:
A Migration Guide

This guide covers the core principles of migrating from Postmark to Mailtrap seamlessly: terminology comparisons, SMTP or API Configurations, and other tech specifications needed for the smooth switch.

Key differences between Mailtrap and Postmark 

  1. With Mailtrap free tier, you can send 1,000 emails/month (user-triggered, bulk, or marketing) and test 100 emails/month. 
  2. In addition to transactional and bulk streams, Mailtrap has Email Marketing. 
  3. Mailtrap allows you to import suppression lists manually or by uploading a CSV file. You can also export suppressions in CSV. 
  4. Depending on the pricing plan, Mailtrap stores emails in the Email Logs for up to 30 days. Email content and historical data are stored and accessible between 3 and 7 days without additional fees. 
  5. Mailtrap offers Email Testing. This is a separate product to inspect HTML/CSS, spam scores, etc., and debug emails in staging, dev, and QA environments before sending them to recipients. Emails sent to Email Testing endpoints don’t count towards your monthly Email Sending quota. You get 100 test emails/month for free, and more are available for purchase. 
  6. Mailtrap offers monthly recurring plans with an option to request annual billing/plan. 

Similarities between Mailtrap and Postmark  

  1. Support for sending with SMTP or REST API. 
  2. Separate streams for transactional and bulk emails. 
  3. You can use return-path records and DKIM to verify a domain. 
  4. Both Postmark and Mailtrap allow you to add unsubscribe options to emails without coding.

Terminology comparison

  • Users
  • Templates
  • Supressions
  • Tags
  • Webhooks
  • Headers
  • Metadata
  • Stream Type

General step-by-step migration flow

  1. Sign up for Mailtrap, add your sending domain under Sending Domains menu, and verify it. See our Getting Started Guide for more details.

  2. If you use SMTP service, change your settings accordingly.

  3. If you use API, check our libraries and API documentation.

  4. Make sure you understand the key differences between Postmark and Mailtrap mentioned above.

    Need some help?

    Read our migration guide or contact our support. Our tech experts will help you every step of the way.

  5. If you’re planning to send more than 200K emails a month, don’t hesitate to get in touch with our deliverability team. We’ll schedule a call with you to make sure you transition properly.

    Mailtrap Tip

    You can use ActionMailer Balancer Ruby gem to proportionally distribute the email sending load between two different sending services (e.g. 70% Postmark and 30% Mailtrap) to mitigate the sending risks.

Getting started

To start sending emails with Mailtrap, you only need to create an account and verify your domain. Domain setup and verification are done from the Sending Domains menu. Read this article to learn more about that process.

Domain verification

  • Once your domain is verified using the provided DNS records, it undergoes an automatic Compliance Check. This process usually takes from a couple of minutes to several hours. You’ll be able to send emails only after the Compliance Check is fully passed and you see the verified status next to your domain. 
  • Make sure you set unsubscribe options with Mailtrap and import your suppression lists from Postmark. 
  • Optionally, create webhooks to receive information about bounces, spam complaints, opens, clicks, and other events. 
  • Enable open and click tracking to understand how customers interact with your emails.

Sending with Mailtrap SMTP

SMTP endpoints

Mailtrap ServerPostmark Server
live.smtp.mailtrap.io
bulk.smtp.mailtrap.io
smtp.postmarkapp.com
smtp-broadcasts.postmarkapp.com

SMTP ports

PortFunctionMailtrapPostmark
587Recommended for encrypted TLS SMTP connection
25May be problematic due to blocking by some mailbox providers to avoid abuse
2525For unencrypted/TLS

SMTP Configuration

Go to Sending Domains and click the verified domain you want to send emails from. Go to the Integration tab and click Integrate under Transactional or Bulk Stream, depending on the type of emails you’d like to send. 

Copy and paste the credentials (for the stream you chose) into your app or project, and you’ll be ready to start sending emails. Read more about SMTP integration here

Note: Turning TLS on is mandatory, as mentioned in the credentials.

Sending with Mailtrap API

Mailtrap API tokens

Mailtrap automatically creates a token when you add a domain, and the token has a Domain Admin access permission by default. You can add or remove token permissions in the API Tokens menu under Settings.

For more information on how to manage API tokens, check our guide.

API Mapping

API typeMailtrapPostmark Naming
The basicsGeneralIntroduction
Email SendingSend emailEmail API
User managementManage user or token permissions
Email testingEmail Testing APIServers API → servers → DeliveryType → Sandbox
WebhooksReceive eventsWebhooks API
Bulk SendingSend emailBulk Email

API Libraries

At the moment there are five libraries available at Mailtrap.

Programming LanguageMailtrapPostmark
NodeJSNodeJS SDKPostmark Node.js
RubyRuby SDKPostmark Ruby gem
PHPPHP SDKPostmark PHP
PythonPython SDKNot supported, community library only
ElixirElixir SDKNot supported, community library only

API Authentication

Mailtrap uses Bearer authentication. So, you need to pass the API token under Authorization header of your email.

User management

Starting from the Business plan on Mailtrap Email API/SMTP, you can add users to your account and manage their permissions. Clicking on User Management under Settings reveals all users in a particular account where you can easily add new members and assign their permissions. You can also manage users and permissions with API

Based on the permissions users get, they can view, access, and/or modify specific functionalities of an app. Note that a user needs Admin permissions to get authenticated and send emails via API. 

Read more about managing users permissions.

ActionMailer Balancer for smooth migration

For Ruby on Rails applications, Mailtrap offers an ActionMailer Balancer that makes the migration smooth. 

ActionMailer extension allows for the proportional distribution of the email-sending load between two different sending services and mitigates sending risks.

After you install the Balancer in your application and make some minor configurations, it will extend ActionMailer’s sending method.

For more detailed info on the boilerplate and use in development, read the Mailtrap ActionMailer Balancer Github page.