published fresh until

How do I send signup and password-reset emails that don't hit spam?

Summary Our recommendation: use a transactional email API on a sending subdomain with SPF, DKIM and DMARC for signup and password-reset mail. Google's guidelines for personal Gmail accounts require SPF or DKIM from every sender and SPF, DKIM and DMARC from bulk senders.

Not for weekly report emails from a script; in-app notification inbox

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

The problem

Our recommendation: when your app needs verification codes, password resets and receipts, plan the sending provider, domain authentication and retry handling before production.

What people use

  • Resend documents sending from Next.js with a React email template. Our recommendation: pair it with React Email for templates if that fits your app.
  • Postmark keeps transactional and broadcast mail in separate IP pools.
  • Amazon SES places new accounts in a sandbox, separately per AWS Region. In the sandbox, recipients must be verified addresses or domains, or the SES mailbox simulator. AWS requires a process for bounce and complaint notifications when requesting production access.
  • SendGrid announced retirement of its Free Email API and Free Marketing Campaigns plans starting May 27, 2025.

Resend's domain docs recommend sending from subdomains to isolate sending reputation; they also advise keeping an established sending address when moving providers.

Domain authentication and other factors that affect delivery

Google's sender guidelines apply to personal Gmail accounts:

  • Every sender: SPF or DKIM, valid forward and reverse DNS, TLS, and a spam rate below 0.30% in Postmaster Tools (Google recommends staying under 0.10%).
  • Google’s bulk-sender requirements heading says 5,000 or more messages a day, although its explanatory prose says more than 5,000. The section requires SPF and DKIM, a DMARC record, a From domain aligned with SPF or DKIM for direct email, and one-click unsubscribe plus a visible unsubscribe link for marketing and subscribed messages sent to personal Gmail accounts.

Resend's domain setup guide shows the SPF/DKIM records to add when you verify the domain. Our recommendation: add DMARC from the start, too.

Ask your agent like this

Our recommendation:

Send transactional email through the provider's HTTP API. Use the sending subdomain mail.example.com. List the DNS records (SPF, DKIM, DMARC) I must add; do not add them yourself. Send the password reset with an idempotency key derived from the user id and request id; reuse the same key and payload for retries of that request. Keep marketing mail out of this code path.

Common mistakes

  • Personal Gmail for OTP and resets. Our recommendation: use a transactional provider for this code path.
  • SMTP on edge runtimes. Cloudflare Workers supports outbound TCP sockets but blocks port 25 by default. Our recommendation: call the provider's HTTP API with fetch, or consider Cloudflare Email Service, which documents a Workers binding; Email Sending is in beta as of November 2026. The Next.js runtime docs list Node.js as the default for pages, layouts and route handlers.
  • Duplicate resets after a retry. Resend's idempotency docs say the same request can be retried with the same key without sending the email again within 24 hours. Our recommendation: use this if your provider supports it, and use a new key for a new reset request.
  • Sending marketing and transactional mail from the same domain/IP pool. Resend says separate subdomains can protect transactional sending reputation from negative recipient responses to marketing mail; Postmark documents separate IP infrastructure. Our recommendation: separate the two traffic types.

Limits

Our recommendation: check current plans before choosing a provider and test delivery with your recipients.

Sending a React Email template from a Next.js route (Resend docs)

Resend's guide says to install resend, create a route such as app/api/send/route.ts, initialize the client from an environment variable, and call emails.send with from, to, subject and the template component as the react option. The guide identifies its example sender as testing-only and requires a sender on your own confirmed domain for production. It shows checking the returned error, returning a 500 response and wrapping the call in try/catch; its embedded prompt reserves try/catch for network failures. That prompt recommends idempotency keys; the dedicated page confirms a 24-hour window, a 256-character maximum, and a key unique to each API request, with an event-type/entity-id pattern suggested.

Sources

Started from a post by @Southern_Bug_1996, packaged by the editor. Original post

Subjects

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# How do I send signup and password-reset emails that don't hit spam?
Summary: Our recommendation: use a transactional email API on a sending subdomain with SPF, DKIM and DMARC for signup and password-reset mail. Google's guidelines for personal Gmail accounts require SPF or DKIM from every sender and SPF, DKIM and DMARC from bulk senders.
Copy for agent
get the whatworks thread signup-and-password-reset-emails-from-my-app-provider-and-spam and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread signup-and-password-reset-emails-from-my-app-provider-and-spam
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks