How to integrate Email Testing with your application

To start using Mailtrap Email Testing, you should integrate it with your app. There are two ways to do it.

Important Note: The credentials below are for the "fake" SMTP used only in the sandbox. Please don't confuse this with Mailtrap Email Sending SMTP credentials, which are for production emails.

#1- Copy SMTP credentials 

Follow these steps:

  1. Go to Email TestingInboxes

  1. Open the inbox (named My Inbox) created by default. 

  1. Under the Integration tab, select SMTP and copy the credentials such as Host, Port, Username, and Password

  1. Paste them into your email-sending script, service, or MTA (any service that supports SMTP integration), and run it. The email will arrive in your inbox in a few seconds. 

#2 - Select your integration

Instead of copy-pasting the SMTP credentials, you can use the code samples already containing your credentials. 

  1. In the Integration tab of your inbox, scroll down to Code Samples and select the programming language or framework you’re working with. 

  1. Copy the configuration and paste it into your email-sending script. Then, run it. The email will arrive in the inbox in a few seconds. 

Learn how exactly Mailtrap can help you streamline email testing processes from our case study with The Software House.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us