Mailtrap Email API/SMTP - SMTP integration

To integrate Mailtrap Email API/SMTP into your project, use SMTP credentials. For API integration, refer to this article

  1. Go to the Sending Domains tab and choose the domain you want to send emails from. Remember that you’ll be able to start sending emails to your recipients once the domain is verified. See sending domain setup and verification instructions here
  2. Open the Integrations tab. 

  1. Click the Integrate button under Transactional Stream or Bulk Stream

    • Transactional Stream is used to send automated, non-promotional application emails that are triggered by the user’s specific action. 

    • Bulk Stream is used to send a single marketing campaign to a large group of recipients in bulk

  1. Toggle the switch to SMTP and copy credentials, such as Host, Port, Username, and Password and paste them into your project, app, email-sending service, or any platform that supports SMTP. 
Transactional Stream SMTP credentials
Bulk Stream SMTP credentials
    • Alternatively, choose the programming language or framework from the menu under Code Samples and copy the sample configuration containing your credentials. 
Transactional Stream code samples
Bulk Stream code samples
  1. Complete your email-sending script and run it. If you did everything correctly, you should find the sent email in the inbox of the email address you indicated in the script. The email will also appear in Email Logs in Mailtrap. 

Remember that each domain has different SMTP credentials that you can always access by clicking on the desired domain and going to the Integrations tab. 

You can also create additional API tokens (or SMTP passwords) by going to SettingsAPI Tokens and clicking Add Token. Read more about creating and managing tokens here

If you need any help with SMTP integration, please, contact our support team at support@mailtrap.io

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