Email Setup

Keep your inbox separate from the email your app sends, set up the records that prove you may send for your domain, and check what happened to each message instead of trusting a "success" response.

Content date: October 15, 2026.

Plain English

A business inbox is where people read and answer mail. An app sender delivers notifications and receipts, and can use a different provider. Four DNS records (see "Domain and DNS") do the setup. MX says where incoming mail goes. SPF lists which servers may send for your domain. DKIM adds a signature proving a message came from your domain. DMARC checks that these match the visible From address and tells receivers what to do when they don't. Your provider gives you the exact values, and even correct records can't promise inbox delivery.

Use this when

Do this before a form, login, receipt, or notification depends on email, and check again when you change domains, sending providers, or credentials.

If you are just starting

Write down who owns the inbox, which provider sends your app's mail, which verified From address you use, where replies go, and who watches for failures. Test with made-up recipients. Never use a visitor's address as your From address. Send from your own verified address and, if replies should reach the visitor, put their checked address in Reply-To.

When your project grows

As of October 2026 the big mailbox providers publish their own rules. Google asks every sender to personal Gmail accounts for SPF or DKIM and says it rejects mail that fails. Senders of about 5,000 or more messages a day to Gmail also need SPF, DKIM, and DMARC (at least p=none) aligned with the From domain, plus one-click unsubscribe on marketing mail. Yahoo asks the same. Microsoft's Outlook.com asks senders of 5,000 or more a day for SPF, DKIM, and DMARC, and failures can land in Junk or bounce with 550 5.7.515. Keep spam complaints well under 0.3%, and authenticate even if you send less. Tell four things apart: the provider accepting a message, delivery events, bounces and complaints, and mail reaching a mailbox. Treat a timeout as unknown, because a blind retry can send a duplicate. Verify that event notices really come from your provider, log little message content, and keep service notices separate from marketing, which needs consent.

Worked example

A tutoring site's mail provider accepts a notification about a new inquiry from Dana. An hour later a bounce event says the tutor's address has a typo and failed permanently. The site keeps Dana's inquiry saved, marks the notification failed, and gives the owner a task to fix the address. It doesn't keep retrying, since retries can't fix a bad address.

Practice

Map sender identity and delivery evidence

  1. Fill in the workbook's table of who owns the inbox, the sender, and the recipient.
  2. Using your provider's documentation, explain in your own words what MX, SPF, DKIM, and DMARC each do.
  3. Sort the workbook's accepted, bounced, and uncertain events into states, and write what each lets you say without claiming inbox delivery.
  4. Draft the retry rule and operator response.
  5. Write a separate real-provider test plan, and mark it not done if you have no authorized test account.

Deliverable: A sender and recipient setup brief, plus a table of delivery states with retry, unknown-outcome, and owner decisions.

Common mistakes to watch for

  • Assuming a verified domain guarantees every message reaches the inbox.
  • A contact form lets visitors choose the recipient, and spammers use your site to send mail.
  • A send times out, the code retries, and a customer gets three copies of one receipt.
  • A bounce report arrives, nobody owns it, and an order confirmation is never resent.

Prompting

A weak prompt

Send all form content from the visitor's address and call it delivered when the API returns success.

A better prompt

Map how email works for [my workflow]: who owns the inbox, which service sends app mail, and which verified From address it uses. Take the SPF, DKIM, and DMARC records from [my provider's current setup page], keep the recipient fixed in configuration, and treat the visitor's address only as a checked Reply-To. Define accepted, delivered, failed, and unknown, plus event verification, safe retries, logging, and who handles bounces. Use made-up data only, with no real sends or billing.

Mail that fails authentication is quietly filtered or rejected, and an app that treats "accepted" as "delivered" tells customers things it doesn't know.

Check before you move on

  • Your inbox and your app's sender are mapped separately, each with an owner.
  • Your From address is fixed in configuration and verified.
  • Visitors can't choose the recipient, From address, or headers.
  • SPF, DKIM, and DMARC values come from your provider, with a link saved.
  • Accepted, delivered, and read stay separate states in your notes.
  • Someone is named to handle bounces and unknown outcomes.

You are done when

  • Your delivery table never treats a provider's "accepted" as proof of inbox delivery.
  • Every provider setting and delivery claim is either backed by a source link or marked unverified.

Questions to think about

Your SPF, DKIM, and DMARC all pass. Can you promise customers your emails reach their inboxes?

No. Those records prove who sent the message. Placement also depends on recipient filters, your sending history, and complaint rates, so watch results separately.

Your send request times out. Is it safe to assume nothing was sent?

No. The provider may have accepted the message before the connection dropped. Check the outcome, or use the provider's duplicate protection, before trying again.

A developer fills the notification's To and From from what visitors type in the form. What goes wrong?

Anyone could send mail to any address as your site, and your domain gets flagged as a spam source. Keep those fields in trusted configuration and validate the visitor's address only as a reply address.

Official references