Supabase Mailtrap SMTP integration

With Mailtrap SMTP, you can move beyond Supabase's limit of 2 emails per hour to a production-ready email-sending solution with comprehensive analytics.

Mailtrap’s native integration with Supabase streamlines your workflow by automatically populating your Supabase project with Mailtrap’s SMTP credentials. You can access this setup via the Integrations page in Mailtrap or through the Supabase Marketplace.

Note: Currently, this integration supports Sending Domains (API/SMTP) only and does not include Email Sandbox configuration. If you would like to see Sandbox support in the future, please leave a feature request here.

Prerequisites:

  • Admin rights for your Mailtrap account.
  • A verified sending domain set up within Mailtrap.
  • An existing Supabase account with an active project.

Use cases:

  • Supabase Auth: Managing email confirmations, magic links, and password resets.
  • Database Events: Triggering transactional emails based on database changes.
  • User Interaction: Powering contact forms or "Send Message" features.

Important: Sending automated emails via Supabase Edge Functions is not covered by this integration. Please refer to our dedicated guide for Edge Functions.

Step-by-step integration guide

Step 1. Initiate the integration

  • Log in to your Mailtrap account.
  • Navigate to the Integrations page from the sidebar.
  • Scroll to the AI & Development section (or search for "Supabase") and locate the Supabase card.
  • Click the Integrate button.

Step 2. Authorize access

  • On the setup screen, click Connect Supabase.

  • Review the permissions for the access of your Supabase organizations and projects, and click Authorize Mailtrap.

Note: Write and Read access is required to update configurations. Moreover, you can revoke the authorization at any time.

Step 3. Select your project

Once authorized, Mailtrap will load your available Supabase projects. Then, all you need to do is:

  • Click the Select a Supabase project dropdown menu
  • Choose the specific project you wish to integrate (e.g., Test Integration).

Step 4. Create an API Token

  • In the Create an API token section, use the dropdown menu to select the Mailtrap Domain you want to use for sending emails.
  • Click Create Token.

Step 5. Configure sender details

Define who the emails will appear to be coming from.

  • Sender name: The name you want displayed in the recipient's inbox (e.g., Julia or Support Team).
  • Sender email: The local part of the email address (e.g., enter noreply to create noreply@your-domain.com).
  • Mailtrap will generate a preview of the SMTP settings (Host, Port, Username, etc.).
  • Click Configure SMTP to finish the process.

You will see a confirmation message stating: "Successfully configured Supabase SMTP."

Manual integration

You can also integrate Mailtrap SMTP with Supabase manually.

Step 1. Obtain your sending credentials

  • Go to Sending Domains and select your domain.

  • Click on Integration, select Transactional Stream, and click Integrate.

  • Under the SMTP tab, you can find your sending credentials, which include Host, Port, Username, and Password.

Step 2. Update the SMTP server in Supabase

  • Click on AuthenticationSMTP settings.

  • Click on EmailsSMTP Settings and enable the Enable Custom SMTP toggle. Update Host, Port, Username, and Password with your Mailtrap credentials, then click Save changes.
  • Update the Sender details and SMTP provider settings like in the screenshot below, and hit Save changes.

Monitor your email performance

Once you send emails from your Supabase project, they should arrive in both your recipient's inbox and your Mailtrap Email Logs. There, you can see useful information such as delivery time, opens/clicks, email HTML source, spam analysis, and more.

You can read more about Mailtrap Email Logs in our dedicated article.

Additionally, you'll be able to see all important stats regarding your sent emails, such as opens, clicks, bounces, and more.

For more information on Mailtrap Analytics, click here.

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