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:
- Go to Email Testing → Inboxes.
- Open the inbox (named My Inbox) created by default.
- Under the Integration tab, select SMTP and copy the credentials such as Host, Port, Username, and Password.
- 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.
- In the Integration tab of your inbox, scroll down to Code Samples and select the programming language or framework you’re working with.
- 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.