Replying as a custom domain from Gmail with Cloudflare Email Routing
Pairing Cloudflare Email Routing with a free outbound SMTP relay (Resend or SMTP2GO) and Gmail's Send Mail As so replies go out from your custom domain without exposing your Gmail address.
If your domain is on Cloudflare, Cloudflare Email Routing lets you forward contact@yourdomain.com to your @gmail.com inbox for free in a couple of minutes.
The problem shows up when you hit Reply. By default, Gmail replies from yourname@gmail.com. Even if you set up smtp.gmail.com with an App Password, Gmail still puts your @gmail.com address in the Sender and Return-Path headers and often displays "via gmail.com" next to your name.
How it fits together
Cloudflare Email Routing is receive-and-forward only—it has no outbound SMTP server. To send from contact@fahim.ca without leaking your Gmail address, pair Cloudflare (inbound) with a free transactional SMTP relay like Resend or SMTP2GO (outbound):
Why not smtp.gmail.com?
| Outbound Method |
Cost |
Leaks @gmail.com in Headers? |
Shows "via gmail.com"? |
SPF / DKIM Pass? |
smtp.gmail.com + App Password |
Free |
Yes (Sender / Return-Path) |
Yes |
Fails DMARC alignment |
| Resend / SMTP2GO / Brevo |
Free tier (1k–3k/mo) |
No |
No |
Full SPF + DKIM pass |
Setting up an outbound SMTP relay
Pick a free transactional SMTP provider—Resend (3,000 emails/month) or SMTP2GO (1,000 emails/month) both work:
- Create an account and add your domain (
fahim.ca).
- Add the DKIM (
TXT or CNAME) and SPF (TXT) DNS records they give you in Cloudflare DNS.
- Once verified, generate SMTP credentials:
- Host: e.g.
smtp.resend.com (or mail.smtp2go.com)
- Port:
587 (TLS) or 465 (SSL)
- Username and password from your provider dashboard
If you already have an SPF TXT record for Cloudflare Email Routing (v=spf1 include:_spf.mx.cloudflare.net ~all), merge the new include: into that single record instead of adding a second v=spf1 record.
Configuring "Send Mail As" in Gmail
- Open Gmail → Settings (gear icon) → See all settings → Accounts and Import.
- Under Send mail as, click Add another email address.
- Enter your display name (
Fahim Abdun-Nur) and contact@fahim.ca.
- Uncheck "Treat as an alias" and click Next Step.
- Enter the SMTP server, port, username, and password from your relay, then click Add Account.
- Gmail sends a verification email to
contact@fahim.ca, which Cloudflare forwards to your Gmail inbox—click the confirmation link or paste the code.
Replying from the receiving address
In Gmail → Settings → Accounts and Import, under When replying to a message, select Reply from the same address the message was sent to.
Inbound mail to contact@fahim.ca still lands in Gmail as usual, and hitting Reply now defaults to From: contact@fahim.ca through your verified SMTP relay without exposing your personal @gmail.com address.