V0
v0 is Vercel’s AI-powered builder that lets you generate apps, forms, pages, and more through simple prompts. In this article, you’ll learn how to connect it to Mailtrap and add email-sending functionality to your projects.
Before we start:
Add and verify your email sending domain since Mailtrap allows you to send emails only from a verified domain.
Make sure your API Token has
adminaccess level to that domain.
Step 1. Add your Mailtrap credentials
Open your v0 project and add your:
Mailtrap API key
Mailtrap
fromemail
To do this, click on Vars in the left-side menu and add the following two variables:

Next, let the AI know that you’ve added the required environment variables it needs to start sending emails via Mailtrap email API.
Please use Mailtrap email api for sending, I've added the required environment variables
The AI will then go over Mailtrap Email API documentation, connect it to your project, and confirm once it’s done.
Step 2. Start sending emails
Once you add your credentials, try sending an email from your project. If you followed everything thus far, you should receive the email in your inbox in a few seconds.
Here is the email in a Gmail inbox I used as my to address:

And here it is in the Mailtrap Email Logs:

Additionally, you’ll be able to see all the important stats regarding your sent emails, such as opens, clicks, bounces, etc.

For more information on Mailtrap Analytics, click here.
Next steps
Use Mailtrap Templates to send branded emails with variables (template guide).
Configure Mailtrap Contacts to push user information to your Mailtrap Lists, so you can later send campaigns to them or use Automations.
Add automation triggers in Mailtrap to send follow-ups to new contacts.
Track open and click rates with Mailtrap Email Tracking.
Read our in-depth Vercel knowledge base article or our detailed Vercel blog guide.
Last updated
Was this helpful?

