INTEGRATIONS · AI APP BUILDERS
Send emails with Lovable
Lovable can build the email feature for you. Verify your domain on MailKaka, paste the prompt below into Lovable, and your app sends welcome, password reset and order emails from your own address.
- 3,000 emails a month free
- Billed in INR
- Sent from Mumbai
- Saved secret MAILKAKA_API_KEY
- Created backend function send-email
- Welcome email sends on sign-up
Welcome to Acme
From Acme <hello@acme.in>
HOW IT WORKS
Live in three steps.
- 01
Verify your domain
Add the DNS records MailKaka shows you. Usually a few minutes.
- 02
Create an API key
Keep it in a server-side secret called MAILKAKA_API_KEY.
- 03
Paste one prompt into Lovable
It adds a backend function that sends from your domain.
PROMPT
Paste this prompt into Lovable
Lovable stores the key as a secret and calls MailKaka from a backend (edge) function, so the key never reaches the browser.
- 1Create a free MailKaka account. The free plan includes 3,000 emails a month.
- 2Add your domain in the dashboard and copy the DNS records it shows, including the _mailkaka-verify TXT record, to your DNS provider. Sending works once the domain shows Verified.
- 3Create an API key for that domain. It starts with mk_. Store it as a secret called MAILKAKA_API_KEY, never in frontend code.
Add transactional email to this app using MailKaka, a Resend-compatible email API.
1. Ask me for my MailKaka API key and save it as a backend secret (Lovable Cloud / Supabase secrets). Name it MAILKAKA_API_KEY. Never expose it in frontend code.
2. Create a backend edge function called send-email. It sends a POST request to https://www.mailkaka.in/api/emails with the header "Authorization: Bearer <MAILKAKA_API_KEY>" and a JSON body: { "from": "<App name> <hello@MY-DOMAIN>", "to": ["<recipient>"], "subject": "...", "html": "..." }. My domain is already verified in MailKaka; use it in the from address.
3. Only call that function from the server side. Never let the browser choose arbitrary recipients: send to the signed-in user's own address, or to addresses the app already trusts.
4. Send a welcome email when a new user signs up. If sending fails, log the error response and show a friendly message instead of crashing.
The full API reference is at https://www.mailkaka.in/docs.md. Read it before writing the code.Sign-up or reset emails not arriving? Fix Supabase auth emails.
WHAT YOU CAN SEND
Every email your app needs.
Welcome emails
Greet every new sign-up from your own address.
OTPs and password resets
Sign-in codes and reset links that arrive fast.
Orders and receipts
Confirmations, invoices and shipping updates.
Replies that reach you
Customer replies land in a shared team mailbox.
TROUBLESHOOTING
If something doesn't work.
The API returns 401 Invalid API key
The secret is missing, misnamed or copied with a space. Check it is called MAILKAKA_API_KEY in the backend secrets, starts with mk_, and that the function reads that exact name.
The API returns 403
The from address isn't on the domain the key belongs to, or the domain isn't verified yet. Finish the DNS records in the dashboard and use an address like hello@your-domain.
Sign-up confirmation or password reset emails never arrive
Those come from Supabase Auth, not from your function. Send them through MailKaka with the Send Email Hook (see the Supabase guide).
The API key shows up in the browser's network tab
The email code is running in the frontend. Ask the builder to move it into a backend function and call that function instead.
Emails land in spam
Add the DMARC record from the dashboard, use a real from name, and avoid link shorteners. New domains also build reputation over the first few days.
BUILT FOR AI AGENTS
Let Claude Code, Cursor or any MCP client run your email.
MailKaka hosts an MCP server. Connect your coding agent once, and it can add your domain and show the DNS records, check verification, send a test email, read delivery status, and create the API key your app needs. You sign in from a browser and choose what it's allowed to do.
- Per-agent limits: 60 sends a minute and 500 emails a day
- Separate permissions for viewing, changing, sending and mailboxes
- A preview before deletes, batch sends and new API keys
- Every connection listed, and removable, in the dashboard
claude mcp add --transport http mailkaka https://www.mailkaka.in/api/mcpFAQ
Common questions.
Can Lovable send emails?
Yes, through a backend function that calls an email API. Lovable writes the function; MailKaka delivers the email from your verified domain.
Why are my Lovable emails not sending?
The usual causes are an unverified domain, the API key missing from the backend secrets, or the code calling the API from the browser. Ask Lovable to log the API's error response; it says which one it is.
Can I send a test email before verifying a domain?
No. MailKaka only sends from domains you've verified, so every email comes from your own address. Adding the DNS records usually takes a few minutes, and the free plan includes one domain.
Why not put the API key in the frontend?
Anyone who opens your site could read it and send email as you. Bounces and spam complaints from that would count against your account. Keep the key in a server-side secret and call MailKaka from a backend function.
Is MailKaka a good email API for Indian startups?
It's built for them. Email is sent from Mumbai, plans are priced and billed in INR through Razorpay (UPI and cards), and the free plan covers 3,000 emails a month. It accepts the same send request as Resend, so moving later is easy either way.
START WITH ONE DOMAIN
Send your first email from Lovable today.
Free for 3,000 emails a month. Paid plans are billed in INR through Razorpay.
RELATED