In this guide, I'll show you how to send reliable transactional emails from your e-commerce Bolt.new projects using Mailtrap's Email API. We'll integrate it with Supabase Edge Functions for a secure, high-deliverability solution.
Disclaimer: Make sure to adjust the Bolt.new prompts in this article according to your specific needs and requirements.
The challenge of transactional emails in e-commerce
In e-commerce, transactional emails represent a key part of the communication with your customers. When someone makes a purchase on your online store, they at least need to receive a purchase confirmation. And they need to receive it on time and in the main inbox.
Not receiving a transactional email, like a purchase confirmation or a password reset for your store, creates anxiety for your customer and can lead to lost trust. There are also abandoned cart reminders, post-purchase follow-ups, and other types of emails that need to be delivered.
Or, imagine having a contact form on your ecommerce site that doesn’t deliver your customers’ emails to you. In short, this is just a roadblock in communication.
Relying on basic server email methods risks low deliverability, IP blacklisting, and a lack of critical analytics.
By integrating the Mailtrap Email API, you gain:
High deliverability: Deliver your emails on time with pre-warmed IPs and infrastructure focused on inbox placement.
Scalability: Effortlessly handle high volumes of transactional emails as your e-commerce store grows and you get more customers.
Advanced analytics: Real-time metrics on delivery, opens, clicks, and mailbox provider performance.
Step 1: Account setup and configuration
First, sign up for a Mailtrap account. Once logged in, navigate to the Sending Domains section, then:
Add your domain: Click Add Sending Domain and enter the domain you want to send emails from (e.g., notifications.yourstore.com).
Copy/paste the DNS records: Mailtrap will provide the necessary DNS records (SPF, DKIM, and optionally DMARC). Copy these records and add them to your domain provider’s DNS configuration.
Retrieve API Token: Navigate to Email API and generate a new API Token. This token is your key for authentication. Treat this token like a password.
Need detailed guidance? Check out our step-by-step guide on sending emails with Bolt.new.
Step 2: Connect Bolt to Supabase
To connect your Bolt project to Supabase, click on the Integrations button in the top-right corner and select Supabase.
Then, simply follow the wizard, create a new Supabase project or select an existing one, and Bolt should confirm the connection.
Step 3: Add Mailtrap email API to Bolt.new
Here is a prompt you can use to connect Mailtrap email API to Bolt.new. Just keep in mind that you’ll need to update the environment variables in Supabase accordingly.
Step 4: Send emails via Bolt.new
Next, preview your Bolt project, navigate to your contact form, fill it out with details, and hit submit.
If there are any errors in sending, Bolt will attempt to fix it once prompted, so keep an eye on the message thread. It’s also helpful to check Edge Functions (Supabase context) error logs and paste them into Bolt.
Note: If Bolt encounters any bugs, it will list them and attempt to fix them once you click the associated button.
Other common issues you might potentially encounter include:
Environment variables failing to load: Check if you’ve correctly integrated Supabase and added your environment variables into Supabase Project Settings.
Emails not sending: Make sure that your domain is verified and that your from domain matches the verified domain.
Step 5: Track email deliverability
Mailtrap provides industry-best analytics to track every email sent from your Bolt.new application. After deployment, use the Mailtrap dashboard to monitor:
Delivery rate: The percentage of emails successfully accepted by recipient servers.
Spam score: The categorization rate by major mailbox providers (e.g., Gmail, Outlook, etc.).
Bounce rate: Quickly flag and address both hard and soft bounces to keep your sender reputation healthy.
By monitoring these metrics, you can quickly identify if, for instance, a recent change in your order confirmation template caused spam filtering to spike at a specific provider.
Conclusion
Sending reliable, high-volume transactional emails from a modern, e-commerce store demands a dedicated solution, especially if it's built with a tool like Bolt.new.
By following this tutorial and configuring the Mailtrap Email API via a secure Supabase Edge Function, you've established an authenticated, scalable, and highly observable email pipeline.
Of course, your email-sending journey doesn’t end here, so make sure to monitor your email performance using Mailtrap's analytics dashboard and maintain the high deliverability your customers expect.



Login and write down your comment.
Login my OpenCart Account