Lovable is a platform that allows you to create everything from contact forms to whole websites and apps, all by using simple prompts. Combined with Mailtrap's robust email infrastructure, you can build sophisticated email functionality into your applications with ease.
This article is based on Mailtrap's official tutorial on how to send email using Lovableand Lovable’s tutorial.
Before we start
Required accounts
- Lovable account - to create contact forms and generate logic
- Mailtrap account - to send emails and manage contacts
- Supabase account - to securely store API keys and manage your database
Prerequisites setup
- Verify your email sending domain - Mailtrap allows you to send emails only from a verified domain. Follow this guide to set up domain verification.
- Get your API Token - Ensure your API Token has admin access level to your domain and contacts.
- Create Custom Fields (if needed) - Set up Custom fields in Mailtrap if your forms have additional inputs you want to save.
- Find your Account ID - You'll need this for creating contacts in Mailtrap. Find it in your Account Management section.
Important Note: The prompts provided are based on our experience with Lovable and GPT-5 as of August 2025. Since both Lovable and LLM models constantly evolve, you may need to adjust these prompts for your specific needs.
Configure Mailtrap SMTP/Email API with Lovable
Step 1: Set up basic email sending
Start with this prompt in Lovable to create a simple email sending functionality: