Back

Set up a transactional email domain with DNS and API key

Verified sending domain, restricted API key saved in hosting, and a delivered test email

EngineeringFounders
Prompt

Set up [email service, e.g. Resend or SendGrid] to send transactional email from [domain, e.g. mail.example.com]. Add the domain there and get its DNS records (SPF, DKIM, return-path, plus MX only if [receiving: yes or no]). Add them in [DNS provider, e.g. Cloudflare] exactly as given, DNS-only, not proxied. Before changing an existing MX or SPF record, show me the change. Merge SPF, never replace it. Recheck until every record verifies. Create an API key limited to sending from this domain, named [key name, e.g. prod-sending]. If receiving, point the inbound webhook at [webhook URL]. Add the key to [hosting app, e.g. Vercel] as [env variable, e.g. EMAIL_API_KEY] for [environments, e.g. production]. Never show the full key in chat. Send one test email to [my address] and confirm delivery. If anything needs a paid plan or new terms, ask me first. Finish with a table: record, type, status, plus the key's last four characters and where it's stored.