Vibe coding
Updated
Add email to your AI-built app
A prompt you can paste, where the API key belongs in each tool, the code the AI should produce, and the mistakes to catch before you ship.
AI code editors
AI app builders
- LovableAdd email to your Lovable appA Supabase Edge Function that sends with Lumail, with the API key stored as a function secret.
- BoltAdd email to your Bolt appA server route or function that sends with Lumail, with the key in .env and never behind VITE_.
- v0Add email to your v0 appA Next.js server action that sends with Lumail, with the key in project env vars, never NEXT_PUBLIC_.
- ReplitAdd email to your Replit appReplit Agent prompt for Node or Python, with the API key in Secrets and checked on the deployment.
Writing the code yourself?
Frequently asked questions
Can an AI-built app send email safely?
Yes, as long as the send runs on the server: a route handler, server action, serverless function or Supabase Edge Function. The most common mistake AI tools make is calling the email API from the browser, which exposes the key.
What should the prompt tell the AI tool?
Where the send runs, where the key comes from, the exact SDK call, that the result is { data, error } rather than an exception, and to pass an idempotency key. Each guide here has a copyable prompt with those rules.
Do I need the Lumail MCP server to send email from my app?
No. Your app sends through the lumail SDK or the REST API with an API token. The MCP server gives a local agent, such as Cursor, Claude Code or Codex, access to your Lumail organization while you build.
How much does Lumail cost for a side project?
The Free plan includes 3,000 emails a month. Premium is $20 a month for 40,000 emails, then $0.60 per 1,000. Subscribers are unlimited on every plan.
How do I test what the AI generated without emailing real people?
Send to fixture addresses such as [email protected] or any .test domain. Lumail runs the full send path and returns an id, but never delivers the message.
Give your AI-built app real email.
3,000 emails a month free. Unlimited subscribers on every plan. Campaigns, automations and transactional email on one domain.