Last updated on April 23, 2019
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:
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:
Mailtrap offers an extensive list of integrations, including Ruby, Python, PHP, Node.js, Java, Scala and C# modules and frameworks. Choose your preferred option to see an example of how to integrate Mailtrap into your application:
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.
STEP #4: Go back to your inbox and see that message sent by your application is immediately caught and appears there:
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 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 as well as view how it would be displayed on desktop, tablet or smartphone.
The HTML Source tab provides you with the HTML markup:
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:
The Text tab shows the plain text of your message:
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.
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.
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:
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.
The basic functionality described above is absolutely free. For bigger teams Mailtrap offers additional awesome features, included in the paid billing 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 Projects.
Your inbox is already a part of a Project (“My Inboxes”, by default). To customize it, go to your Mailtrap home page. Press the Edit icon to rename your project. Also, you can delete it by pressing the Delete icon, and then create a New Project. Keep in mind that if you delete your project, all inboxes inside it will be removed too.
Mailtrap lets you to share your inboxes with other users as well as invite new members to collaborate within a whole project.
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 Team Members tab. Just enter an email address and this user will get full access to your inbox and all the messages. If this address is not registered in Mailtrap yet, its owner will be offered to create a free account first.
Further, your team member will find this inbox in the Shared Inboxes section of the main menu. To share all inboxes grouped in the project, press the Project Team Members link in the Team Members tab. There you can enter the email address to send the invitation by email or get the shareable link.
In the same tab, you also can review and edit the list of the Project Team Members as well as monitor their status (pending, user, or owner).
Otherwise, you can go to your home page and press the Project Team Members icon next to the Project 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:
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.
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:
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.
Tip: The number of forwarding rules you can create for one inbox depends on the billing 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:
To get details on billing 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:
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.
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!