Supabase Transactional Emails 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.
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.
Step-by-step integration guide
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.

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.

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).

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.

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 [email protected]).
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.
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.

Update the SMTP server in Supabase
Open your Supabase project dashboard and select your project.

Click on Authentication → SMTP settings.

Click on Emails → SMTP 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.
Last updated
Was this helpful?

