Mailtrap Email Sending SMTP integration

To integrate Mailtrap Email Sending 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 SMTP/API Settings tab. There, you’ll see Transactional Stream and Bulk Stream

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

    • Bulk Stream is used to send a single marketing campaign to a large group of recipients in bulk. To send bulk emails, use the SMTP credentials under the Bulk Stream. 

    • Transactional and Bulk streams have different hosts, so make sure you choose the correct one. 

  1. Copy the SMTP credentials, such as Host, Port, Username, and Password, for either Stream and paste them into your project, app, email-sending service, or any platform that supports SMTP. Alternatively, choose the programming language or framework from the dropdown menu and copy the sample configuration containing your credentials. For example, this is what the PHPMailer configuration would look like for each stream: 

  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, going to the SMTP/API Settings tab, and toggling the switch to SMTP. 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