Mailtrap Getting Started Guide

Welcome to Mailtrap

We are happy to welcome you as a Mailtrap user! Mailtrap is a fake SMTP server for testing emails sent from the development and staging environments without spamming real customers or flooding your own and team members inboxes. It is designed to catch your test emails. Mailtrap emulates the process of sending, so we won’t deliver your emails to a real user. We just keep them for you to test and optimize your HTML email campaigns.

In this post we will share how to set up your account, easy and fast, as well as guide you through the testing process.

Let’s go through the basic steps first and then dive deeper into all Mailtrap features.

First steps with the basic Mailtrap functionality

All you need to do is just set Mailtrap as an SMTP server for your application, following four easy steps described below. Once you’ve logged in to your account, you will get to the home page:

Mailtrap's Home Page
Mailtrap’s Home Page

STEP #1: Open your inbox: click on the Demo Inbox or on the Settings icon in the Action section.

Tip: We have already created an inbox for you. By default, it’s “Demo inbox”. You can easily rename it with the Edit  action button or Delete  it and create a new one. It’s your choice.

STEP #2: Copy SMTP credentials and embed them into your development environment:

SMTP Settings
SMTP Settings

Mailtrap offers an extensive list of integrations, including Ruby, Python, PHP, Node.js, Java, Scala and C# modules and frameworks. Choose your prefered option to see an example how to integrate Mailtrap into your application:

Options for Easy Integration with your App
Options for Easy Integration with your App

Tip: each Mailtrap inbox has its own SMTP/POP3 server credentials. You can reset them any time you need.

STEP #3: Configure your development environment with appropriate Mailtrap settings and send your first test message.

Dev Configuration with Mailtrap
Dev Configuration with Mailtrap

STEP #4: Go back to your inbox and see that message sent by your application is immediately caught and appears there:

Mailtrap Email Trapped in the Inbox
Mailtrap Email Trapped in the Inbox

This way, you have verified that email sending and retrieving are both functioning properly. It’s perfectly simple, isn’t it? Besides, other Mailtrap users can share their inboxes with you. If they do, you will find them in the Shared Inboxes section of the main menu. 

Tip: You can also share your inbox with anyone, but this option is available for advanced users. Go to the “Premium Perks” section below to get more details.

What else can you do with Mailtrap?

Perhaps, you need to to quickly check if your application is sending emails correctly. But most probably, you would like to review how your message displays and performs. Mailtrap offers multiple helpful options for email content verification and debugging.HTML tab demonstrates how your message might look in the recipient’s mail client. In fact, it shows how the email is rendered by a web browser. You can also open your message in a new tab, by clicking the  icon on the right of the tabs bar, as well as view how it would be displayed on desktop, tablet or smartphone, by pressing the  icon.

Mailtrap HTML Tab
Mailtrap HTML Tab

The HTML Source tab provides you with the HTML markup:

Mailtrap HTML Source
Mailtrap HTML Source

Go to the Check HTML tab to find a list of HTML/CSS properties, which might cause issues with rendering your message in specific email clients:

Mailtrap Check HTML Tab
Mailtrap Check HTML Tab

The Text tab shows the plain text of your message:

Mailtrap Text Tab
Mailtrap Text Tab

In the Raw tab you can review the raw email data, as received from the SMTP relay. If the raw data exceeds 300 KB, you will be given the option to download it as .eml file.

Mailtrap Raw Data Tab
Mailtrap Raw Data Tab

Analysis is another important and highly demanded feature. In this tab Mailtrap offers spam check results and provides recommendations on how to decrease spam score, if any issues were found.

Mailtrap Spam Check
Mailtrap Spam Check

In the same tab you will also find a Blacklists Report: Mailtrap checks whether your IP or domain has been listed in any of the commonly used blacklists. It shows resources which have been queried:

Mailtrap Blacklists Report
Mailtrap Blacklists Report

Tip: Don’t forget to check the email headers and attachments. They are not just an important part of content but also affect the spam score.

Premium perks

The basic functionality described above is absolutely free. For bigger teams Mailtrap offers additional awesome features, included in the paid subscription plans. Below are some useful tips on using them.

Carefully organized data

To keep everything in order and be able to easily find or share necessary data, set up a new inbox for each test server, and then group them into Companies.

Mailtrap's Company
Mailtrap’s Company

Your inbox is already a part of a Company (“My Inboxes”, by default). To customize it, go to your Mailtrap home page. Press the Edit  icon to rename your company. Also, you can delete it by pressing this  icon, and then create a New Company. Keep in mind that if you delete your company, all inboxes inside it will be removed too.

Collaboration options

Mailtrap lets you to share your inboxes with other users as well as invite new members to collaborate within a whole company.

Let’s go back to the Inbox Settings. To invite your teammates (or anyone you wish, actually) to work together on debugging your emails, switch to the Users tab. Just enter an email address registered in Mailtrap, and this user will get full access to your inbox and all the messages.

Mailtrap Company Users
Mailtrap Company Users

He or she will find them in the Shared Inboxes section of the main menu. To share all inboxes grouped in the company, press the Company users link in the Users tab. There you will find a shareable link and will be able to review and edit the list of the Company users.

Mailtrap Company Invite Users
Mailtrap Company Invite Users

Otherwise, you can go to your home page and press the Company users  icon next to the Company name.

Viewing emails in the real inboxes

If you need to check how your message will be displayed in a particular email client, or your customer asks you to demonstrate results of your work, you can forward any message to a real user’s inbox, manually or automatically.

Please note that verification is needed to prevent Mailtrap usage for spam and fraud!

To forward a particular message from your inbox, go to the Inbox Settings and in the Manual Forward tab enter the email address where you wish to send your message, and press Add Email:

Mailtrap Manual Forward Email
Mailtrap Manual Forward Email

After that the selected email recipient will get a request to confirm receiving your forwarded messages. If agreed, this email address will appear in the “Manual Forwarded Emails” list:

Mailtrap Confirmed Manual Forwarding Address

Now you can choose any email from your inbox and forward it to the confirmed email address by pressing Forward email icon in the message menu:

Mailtrap Forward Email in Message Menu
Mailtrap Forward Email in Message Menu

To improve your user experience and expand collaboration options, Mailtrap allows you to forward all caught messages to the real email addresses and domains automatically. In the Auto Forward tab you can create a list of rules for automatic forwarding. Select “Email” or “Domain”, enter an email address or domain value, then click on the Add Rule button. Once those emails and/or domains are verified, all messages trapped into this inbox will be automatically forwarded according to the specified rules.

Mailtrap Auto Forwarding Rules
Mailtrap Auto Forwarding Rules

Tip: The number of forwarding rules you can create for one inbox depends on the subscription plan you currently use.

Moreover, your inbox has an email address where you can send messages. It can be enabled in the Email Address tab:

Mailtrap Inbox Email Address
Mailtrap Inbox Email Address

To get details on subscription plans, follow this link or press Upgrade button in your account.

Use Mailtrap API

You can also access Mailtrap’s functionality by using its API. Go to your account menu on the Home page, and select API from the drop-down list:

Mailtrap's API Access
Mailtrap’s API Access

There you will get your API token, link to API Docs and will be able to specify a list of domains, which will have access to API by CORS.

The Mailtrap API uses REST protocol and can return calls in JSON or XML data formats.

To get more information and examples, go to Mailtrap API Documentation. It covers core resources that are used to manipulate the main entities.

More about Mailtrap

Still have some questions about Mailtrap? Check out the Faq section. You can always go back to it from your account menu.

Mailtrap's FAQ
Mailtrap’s FAQ

You are more than welcome to join the Mailtrap community! Feel free to submit your ideas and feature requests here (press Help in the main menu of mailtrap.io website); follow us on Facebook and Twitter to stay tuned!