Amazon SES to Mailtrap:
A Migration Guide

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

Key Differences Between Amazon SES and Mailtrap

  1. Mailtrap doesn’t require extensive coding skills and experience for setup and integration.
  2. Mailtrap offers monthly recurring plans with an option to request annual billing/plan. Unlike Amazon SES, Mailtrap doesn’t feature a pay-as-you-go plan, but we have a 1000-emails free plan to test and evaluate our service.
  3. Your emails are stored under Mailtrap Email Logs for up to 30 days, depending on your pricing plan. We also store email content and hard data between 3 and 7 days.
  4. Mailtrap features a Bulk Stream, which allows you to send emails to many recipients at once (newsletters, product updates, marketing promotions, etc.). It also offers an email marketing product to schedule and send your campaigns.
  5. Mailtrap offers Email Testing. This is an email sandbox for inspecting HTML/CSS, spam scores, etc., and debugging emails in staging, dev, and QA environments before sending them to recipients. 
  6. Mailtrap features Actionable Analytics, allowing you to get in-depth email stats. SES offers only basic metrics and requires third-party apps for detailed stats. 
  7. Amazon SES doesn’t allow you to add unsubscribe options to emails without coding.

Mailtrap and Amazon SES – Similarities

  1. Support for sending with SMTP or REST API.  
  2. You can use return-path records and DKIM to verify a domain. 
  3. You can add a .csv file to import suppressed email addresses. 

Terminology comparison

  • Identity and Access Management (IAM)
  • Template (CreateTemplate – API operation)
  • Account-level suppression list
  • Message Tags (closest comparison, but the logic is different)
  • Event Notifications
  • CONFIGURATIONSET (you have to store all the headers in configuration and create it in advance) or use

    SendRawEmail API method

  • Message Tags

General step-by-step migration flow

  1. After signing up for Mailtrap, select the Sending Domains menu. Add your domain and proceed to verify it. For more details, see our Getting Started Guide.

  2. If you choose SMTP service, switch the sending settings as per the credentials Mailtrap provides. See the info under the SMTP header below.

  3. Should you select API integration, check libraries and API documentation.

  4. Export your contacts list from Amazon SES as CSV and import them to Mailtrap. Check our step-by-step guide.

    Need some help?

    Contact our support and our tech experts will help you with it.

  5. You can also import your email templates as HTML or create new ones using an HTML or drag-and-drop template builder. For more information, go to the Email Templates guide.

  6. If you plan to send more than 200k emails a month, contacting Mailtrap support is highly recommended. They will help you through the process, assign a dedicated IP, and check if everything is set up correctly.

    Mailtrap Tip

    Use ActionMailer Balancer Ruby gem to proportionally distribute the email sending load between two different sending services (e.g. 70% Amazon SES 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 can send emails only after the Compliance Check is fully passed and you see the verified status next to your domain.
Domain verification tab - verified domain
  • Set unsubscribe options with Mailtrap and import your suppression lists from Amazon SES (as CSV). Also, remember to import your email list and HTML templates into Mailtrap. 
  • 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

Amazon Servers

live.smtp.mailtrap.io
bulk.smtp.mailtrap.io
email-smtp.us-east-2.amazonaws.com (+16 more) Show all
email-smtp.us-east-1.amazonaws.com
email-smtp-fips.us-east-1.amazonaws.com
email-smtp.us-west-1.amazonaws.com
email-smtp.us-west-2.amazonaws.com
email-smtp-fips.us-west-2.amazonaws.com
email-smtp.ap-south-1.amazonaws.com
email-smtp.ap-northeast-3.amazonaws.com
email-smtp.ap-northeast-2.amazonaws.com
email-smtp.ap-southeast-1.amazonaws.com
email-smtp.ap-southeast-2.amazonaws.com
email-smtp.ap-northeast-1.amazonaws.com
email-smtp.ca-central-1.amazonaws.com
email-smtp.eu-central-1.amazonaws.com
email-smtp.eu-west-1.amazonaws.com
email-smtp.eu-west-2.amazonaws.com
email-smtp.eu-west-3.amazonaws.com
email-smtp.eu-north-1.amazonaws.com
email-smtp.sa-east-1.amazonaws.com

SMTP Ports

PortFunction
587The recommended SMTP relay with TSL.
25High traffic, blocked by some mailbox providers due to abuse.
2525Alternative port, in case you encounter issues with other ports.

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.

Mailtrap Sending Domains Integration selection tab

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

Mailtrap SMTP Bulk Stream Integration

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. By default, the token has Domain Admin access permission. You can edit the token permissions in the API Tokens menu under Settings.

Learn more on how to manage API tokens in our guide.

API Mapping

API typeMailtrapSES Naming
The BasicsGeneralWelcome
SendingSend emailSendEmail, SendRawEmail,
SendTemplatedEmail
Email TestingEmail Testing API

API Libraries

At the moment, nine libraries are available at Mailtrap.

Programming LanguageMailtrapAmazon SES
Node.jsNode.js SDKNot supported
NodeMailer (Node.js)NodeMailer SDKNot supported
PHPPHP SDKPHP SDK
PHP (Laravel + Symphony)PHP SDKNot supported
RubyRuby SDKRuby SDK
Ruby (ActionMailer)ActionMailer SDKNot supported
PythonPython SDKPython SDK
ElixirElixir SDKNot supported
JavaJava SDKJava SDK

API Authentication

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

API Authentication

We use Bearer authentication. Pass the API token into the code under the header Authorization.

Permissions/User management

If you are on the Business plan or higher, you can add users to your account and manage their permissions. To do it, click the User Management menu under Settings, then the three dots (more menu) on the right. You can also manage users and permissions with API.

Mailtrap user management menu

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.

Additionally, Mailtrap allows you to enable or disable app-based 2FA for all or some users within your account with an option to enforce 2FA for all users. Check our 2FA guide for more details. 

If you want to learn more about managing users’ permissions, click this link ◀️.

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 and make some minor configurations, ActionMailer’s sending method will get extended.

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