SuperSend TX + Lovable

Add transactional email to a Lovable app using your SuperSend TX API key and a chat prompt.

When to use SuperSend TX

  • Password reset, verification, receipts, and other transactional mail
  • Branded from on your own domain after DNS verify
  • Supabase Auth hooks or Edge Functions that should call an HTTP API instead of SMTP

Lovable projects often use Supabase — see Supabase Auth email for the Send Email hook and Edge Function setup.

1. Add your API key

  1. Open app.supersendtx.comAPI Keys → create a key (stx_…).
  2. In Lovable, open your project SettingsSecrets (or the env/secrets panel Lovable exposes for backend code).
  3. Add:
SUPERSENDTX_API_KEY=stx_your_key_here

Use the secret name exactly — server routes and Edge Functions should read process.env.SUPERSENDTX_API_KEY. Never put the key in client-side React components.

2. Paste this prompt in Lovable chat

Integrate SuperSend TX transactional email into this app.

Docs (read first):
- https://docs.supersendtx.com/guides/supabase
- https://docs.supersendtx.com/ai/agent-skill
- https://docs.supersendtx.com/openapi.yaml
- https://docs.supersendtx.com/builders/lovable

Rules:
1. Store the API key in SUPERSENDTX_API_KEY (already in Lovable Secrets). Never expose stx_ keys in the browser.
2. Send via POST https://api.supersendtx.com/emails with Authorization: Bearer $SUPERSENDTX_API_KEY.
3. Until our domain is verified, sandbox sends must use from "noreply@mail.supersendtx.com" and to only our account email.
4. Add a server-side send path (Supabase Edge Function, API route, or backend helper) for password-reset / verification email.
5. Use canonical fields: html, text, reply_to. Prefer npm package supersendtx if the backend is Node.

After domain verify in SuperSend TX, switch from to noreply@ourdomain.com.

Replace “our account email” with the email on your SuperSend TX account if the agent asks.

3. Minimal server send (Node / Edge)

const res = await fetch('https://api.supersendtx.com/emails', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.SUPERSENDTX_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    from: 'noreply@yourdomain.com',
    to: 'user@example.com',
    subject: 'Verify your email',
    html: '<p>Click the link to verify.</p>',
  }),
})

Or install supersendtx and use the SDK — see Next.js.

Sandbox self-test

Before DNS verify:

{
  "from": "noreply@mail.supersendtx.com",
  "to": "YOUR_ACCOUNT_EMAIL",
  "subject": "SuperSend TX sandbox check",
  "html": "<p>It works.</p>"
}

Production

  1. Add your domain in the SuperSend TX dashboard.
  2. Apply DNS (Cloudflare integration or registrar credentials).
  3. Verify, then update from to an address on that domain.