← DeployCloud

Sending Email From Apps Guide

Application email splits into transactional (receipts, resets, invites — sent one at a time, expected instantly) and bulk (newsletters, campaigns). Mixing the two on one domain is how password resets end up in spam.

Modern providers are HTTP APIs: Resend, Postmark, SendGrid, Mailgun and Amazon SES all take JSON and return a message ID. Deliverability — authentication, reputation, bounce hygiene — is where the real work lives, and it starts before your first send.

Authenticate your domain first

Set up SPF, DKIM and DMARC before sending anything; Gmail and Yahoo now require aligned authentication — plus one-click unsubscribe for bulk senders — and junk unauthenticated mail outright. Send from a subdomain like mail.yourapp.com so transactional reputation stays insulated from marketing experiments. Start DMARC at p=none to observe, then tighten to quarantine or reject.

💬 Chat with our AI →

Send from a queue, not the request

Providers have outages and latency, so enqueue sends and let a worker deliver with retries and exponential backoff — Cloudflare Queues, SQS or BullMQ all fit. Outbound port 25 is blocked on most clouds anyway, which is one more reason HTTP APIs win. Build templates with React Email or MJML, always include a plain-text part, and key each send with an idempotency token so retries cannot double-mail a user.

💬 Chat with our AI →

Handle bounces and complaints

Subscribe to your provider's bounce and complaint webhooks and maintain a suppression list: hard bounces never get mailed again, and a spam complaint unsubscribes that user everywhere. Warm up new domains gradually rather than blasting a full list on day one, and watch Google Postmaster Tools for reputation dips before they become blocks.

💬 Chat with our AI →

Choosing a provider

Resend is the developer-experience pick with first-class React Email support. Postmark is known for fast, reliable transactional delivery. SendGrid and Mailgun cover transactional and marketing at scale, and Amazon SES is the bare building block — an API plus little else, so you assemble suppression and analytics yourself. Any of them beats running your own SMTP server.

💬 Chat with our AI →

Frequently asked questions

Why do my emails land in spam?

Usually missing SPF/DKIM/DMARC alignment, a cold domain sending sudden volume, or transactional and marketing mail sharing one reputation. Fix authentication first.

Can I send email from Cloudflare Workers?

Yes — via HTTP APIs like Resend, SendGrid or Mailgun. Classic SMTP on port 25 is blocked, so API-based providers are the practical route.

Do I really need DMARC?

Yes. Gmail and Yahoo expect it, and it stops others spoofing your domain. Begin with p=none and monitoring, then move to quarantine or reject.

Should I use SES or a higher-level provider?

SES suits high volume with engineering time to build bounce handling and suppression. Resend or Postmark get a small team to reliable inboxing much faster.

💬 Chat with our AI →

💬 Chat with our AI →

Generate a blueprint free →

Explore the full desk on the home page →