The short answer
To send email from your app, tell your connected coding agent to switch on email. Your app then sends with the Resend package exactly as it would anywhere. There is no Resend account to open, no domain to verify and no DNS record to add. Email is for your app's own users: a welcome, a password reset, a receipt, a contact form. It is not for newsletters or bulk mail.
Say this to your coding agent
Let this app send email, for example a welcome message when someone signs up.
If your agent is not connected yet, paste this first: Set this project up to deploy on Antideploy. Fetch https://antideploy.com/agent.md and follow it.
What your agent does
-
It switches email on before it writes the message
So the message is written and sent against the real thing. The variables go into your
.envthrough a redirect that never prints the token that lets your app send. -
The deploy gives the running app the same variables
These are
RESEND_API_KEY,RESEND_BASE_URL,RESEND_API_URLandEMAIL_FROM. Do not copy them into your secrets.
How your code sends
The Resend packages read RESEND_BASE_URL in Node and RESEND_API_URL in Python. Both point at Antideploy's relay, so nothing else is configured.
import { Resend } from "resend";
const resend = new Resend(process.env.RESEND_API_KEY);
await resend.emails.send({
from: process.env.EMAIL_FROM,
to: "maya@example.com",
subject: "Welcome to Verdant",
html: "<p>Glad you are here.</p>",
replyTo: "hello@verdant.in",
});
# Python
import os, resend
resend.api_key = os.environ["RESEND_API_KEY"]
resend.Emails.send({
"from": os.environ["EMAIL_FROM"],
"to": ["maya@example.com"],
"subject": "Welcome to Verdant",
"html": "<p>Glad you are here.</p>",
"reply_to": "hello@verdant.in",
})
What the relay allows
- The message always leaves from your application's own address under Antideploy's sending domain, with your application's name as the display name, whatever your
fromsays - Replies do not come back to that address, so set a reply-to address that you read
- At most five addresses on one message, and one message at a time
- No attachments, scheduling, templates or batch sending
- Ten messages a minute for one application
How many you can send
By plan, per application, in any 24 hours: 20 addresses on Free, 100 on Go, 500 on Pro and 2,000 on Scale. An account less than 7 days old can send to 10 addresses a day whatever it pays. Over a limit the answer is a 429 with Resend's own error name, daily_quota_exceeded or rate_limit_exceeded. Show a person a message to try later, and do not retry in a loop.
What is checked
Every app shares one sending domain, so one app mailing addresses that do not exist would cost the others their place in the inbox. An app whose mail bounces or draws spam reports is paused automatically and its owner is emailed. No subject, body or address is kept.