Connecting to Mailtrap

Introduction

This article shows the steps required to integrate Gravity SMTP on your website with the Mailtrap service. Mailtrap is an email delivery platform offering both a sandbox environment for testing and a transactional email API for production sends.

Steps

To allow Gravity SMTP to send messages from your website via the Mailtrap service, you will need to complete the following steps:

  1. Login to your Mailtrap account.
  2. Obtain your Mailtrap API token.
    This will be required in settings to create the link between Mailtrap and your website via Gravity SMTP. Refer to this help guide for instructions on how to find your API token in your Mailtrap account.
  3. Verify your domain in Mailtrap.
    Adding a verified domain to your Mailtrap account is required to prove ownership of the email address and domain used for outgoing messages. You must complete this step before configuring the Mailtrap Integration within Gravity SMTP. Refer to this help guide for instructions on how to complete this step.
  4. Complete the Gravity SMTP Settings screen.
    Go to Gravity SMTP → Settings → Integrations and click the + icon. From the list of available integrations, search and select Mailtrap. This will add it to your integrations and display its settings fields, which you’ll need to complete to finish setup. See this help guide for a description of these settings.
  5. Click the “Save Changes” button.
    After saving, you’ll return to the Settings card page, where the new integration card will appear in the list. You can then test using the Gravity SMTP “Send a Test” Tool.

Once the integration is set up, it will be ready for use. You can verify the connection with a test email and send it through Mailtrap when needed.

Sandbox Mode: Mailtrap includes a sandbox environment that routes emails to a test inbox rather than to real recipients. To use it, enable Sandbox Mode in the integration settings, then enter your Sandbox Inbox ID under Mailtrap → Inboxes. This is separate from Gravity SMTP built-in Test Mode.