Cloudflare SMTP relay: Cloudflare does not send email — here is what to use
Cloudflare has Email Routing (inbound forwarding) and Workers, but no outbound SMTP relay; the MailChannels-for-Workers integration ended in 2024. What "cloudflare smtp" actually means, how to keep DNS on Cloudflare and send through a relay, and the SPF/DKIM records to add.
Cloudflare outgoing mail server: none — Cloudflare does not operate an outbound SMTP server; use a relay such as smtp.queensmtp.com with your DNS on Cloudflare.
Cloudflare SMTP settings at a glance
| Outgoing (SMTP) host | none — Cloudflare does not operate an outbound SMTP server; use a relay such as smtp.queensmtp.com with your DNS on Cloudflare |
|---|---|
| Ports & encryption |
587 — STARTTLS <em>(on your relay)</em>465 — SSL/TLS <em>(on your relay)</em> |
| Username | your relay's SMTP username |
| Password | your relay's SMTP password |
| Authentication | Cloudflare Email Routing only forwards inbound mail to another mailbox. Cloudflare Workers can call an email API over HTTPS (no raw SMTP sockets from Workers), which is why a REST email API is the usual pattern there. |
How to set up Cloudflare SMTP
- Keep the domain on Cloudflare DNS; add MX (if you receive mail), SPF TXT including your relay, DKIM TXT from the relay, and a DMARC record — all DNS-only.
- Point your app or CMS at the relay: host smtp.queensmtp.com, port 587 STARTTLS.
- From Workers, send via the relay's HTTPS API (POST /v1/send with a Bearer key) instead of SMTP.
Sending limits
- Email Routing: inbound only, no sending.
- Workers: outbound SMTP sockets are not available; use an HTTP email API.
- The proxied (orange-cloud) DNS records must not be used for MX/mail hosts — keep mail records DNS-only (grey cloud).
Things that catch people out
- Proxying a mail hostname through Cloudflare breaks SMTP and IMAP — those records must be grey-cloud.
- The old "MailChannels via Workers" free path was discontinued; scripts that relied on it need a real provider.
Common Cloudflare SMTP errors
| Server reply | Meaning | Fix |
|---|---|---|
Connection timed out to mail.yourdomain.com | The mail hostname is proxied by Cloudflare. | Set the record to DNS only. |
More codes: 535 authentication failed, 550 relay denied, 554 rejected as spam, connection timed out — or all SMTP error codes.
When Cloudflare is not enough for your app
When a provider caps you or blocks a port, point the same app at QueenSMTP instead: host smtp.queensmtp.com, port 587 (STARTTLS) or 465 (SSL), your SMTP username and password from the dashboard. $5/year plus $0.10 per 1,000 emails, 100 free a day to test.
Get SMTP credentials — free to test Test your relay nowRelated settings
Cloudflare SMTP — questions
No. Cloudflare provides inbound Email Routing and DNS, not an outbound SMTP relay. Keep DNS on Cloudflare and send through an SMTP relay or email API.
Related Guides
Continue learning with these related articles