--- name: branded-mail description: "Give any of your websites its own free branded email sender (invitations@domain, no @gmail, no @agentmail) without running a mail server — Brevo free plan for sending (300 mails/day), DNS authentication set by the agent through the registrar's API, replies via Reply-To or free forwarding. Born on Vox Populi (voxpopuli.one, 02-08-2026). TRIGGER when a site or app must send email as its own domain: 'our own mail for ', 'send invitations from the domain', 'a free mail server', 'the sender should be @', or when a backend's mailer is unconfigured. NOT for high-volume marketing blasts (paid tier), NOT for a full personal mailbox (that is a mail host), NOT for agent-to-agent mail." --- *From Frank's Studio — studio.smartrules.ai · install: npx skills add gfrankgva/studio-skills* # Branded mail — a real @domain sender, free, no server **The idea.** Never run a mail server: a fresh server has no reputation and lands in spam. Instead, a free relay (Brevo) sends AS the domain, and DNS records prove to the world the domain allowed it. The agent does everything except create accounts. **Proven on.** Vox Populi, voxpopuli.one, 02-08-2026 (see status note at the bottom). ## The pieces | Piece | Role | Cost | |---|---|---| | Brevo (brevo.com) | Sends the mail as `name@domain`, 300/day free | 0 | | Registrar DNS API (GoDaddy shown; any registrar with a DNS API works) | SPF + DKIM records that authenticate the sender | 0 | | Backend mailer with driver selection by env | The app calls one `send_email()`; the driver is config | 0 | | Reply-To header → your own inbox | Replies work with zero receiving setup | 0 | | Later, if receiving at the domain is wanted: ImprovMX free | MX forwarding to your inbox | 0 | ## The recipe 1. **The owner's only manual step**: they create the free Brevo account themselves (accounts and passwords belong to the owner, never the agent) and hand over the API key. Store it as `BREVO_API_KEY` in your keys file, never echoed. 2. **Declare the domain in Brevo** via API: `POST https://api.brevo.com/v3/senders/domains` with the domain → the response carries the DNS records Brevo wants (DKIM TXT, brevo-code TXT). 3. **Set DNS via the registrar API** (GoDaddy: `PUT https://api.godaddy.com/v1/domains/{domain}/records/TXT/...` with `sso-key KEY:SECRET` auth — tested working 02-08-2026). Records: the Brevo DKIM + verification TXTs, and SPF `v=spf1 include:sendinblue.com ~all` (merge with any existing SPF, never two SPF records). 4. **Authenticate + create the sender** via API: trigger domain authentication, then `POST /v3/senders` with `{"name": "", "email": "invitations@"}`. 5. **Wire the backend.** The house mailer pattern: one `send_email()` that picks a driver from env — SMTP if `SMTP_*` set, else Brevo if `BREVO_API_KEY` set (HTTP `POST /v3/smtp/email`, stdlib urllib, no new deps), else raise NotConfigured. Add a `REPLY_TO` env, default the owner's own inbox. Put `BREVO_API_KEY` in the server's `.env`, restart, done. 6. **Prove it.** Send one real mail to the owner's own address from the app's real flow (not a bare curl): the proof is the mail in the inbox with the branded sender and no spam flag. Screenshot or the owner's word. 7. **Document the account** in your notes: which sites send through it, daily quota used, where the key lives. ## Guardrails - One Brevo account serves MANY sites: each new site = one more authenticated domain + sender in the same account. Do not create per-site accounts. - 300 mails/day shared across all sites on the free plan; if a campaign needs more, say the cost of the paid tier BEFORE sending (house rule: check the cheap path first). - Never two SPF TXT records on one domain — merge includes into one. - The registrar API writes DNS: read the existing records first, add, never blind-overwrite the whole record set. ## Status - 02-08-2026: recipe written during the Vox Populi session; GoDaddy DNS API access verified live; Brevo account creation pending the owner's hand — this note is replaced by the proof line once the first branded mail lands in the inbox.