Skip to content

zxcvresque/Custom-Email-Setup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

banner

Free Cloudflare SMTP2GO Gmail


📬 What You'll Build

A fully working yourname@yourdomain.com email address — receive in Gmail/Outlook, send from Gmail/Outlook — using only free services. No hosting required.

Service Role Cost
Cloudflare DNS + inbound email forwarding Free forever
SMTP2GO Outbound sending via SMTP Free (1,000/mo · 200/day)
Gmail / Outlook Your actual inbox Your existing account

🗺️ Architecture

flowchart TD
    A["📨 Sender\nanyone@anywhere.com"]:::sender -->|"to hello@yourdomain.com"| B

    subgraph CF ["☁️ Cloudflare — Email Routing"]
        B["🔀 MX Records\nhello@yourdomain.com"]:::cloudflare
    end

    B -->|"forwarded instantly"| C["📥 Your Gmail / Outlook\ndestination inbox"]:::inbox

    C -->|"compose as hello@yourdomain.com"| D

    subgraph S2 ["🔵 SMTP2GO — Free 1,000/mo"]
        D["📤 mail.smtp2go.com:587\nSPF + DKIM signed"]:::smtp
    end

    D -->|"delivered"| E["📬 Recipient's Inbox"]:::recipient

    classDef sender     fill:#1e293b,stroke:#64748b,color:#e2e8f0
    classDef cloudflare fill:#7c2d00,stroke:#f6821f,color:#fed7aa
    classDef inbox      fill:#14532d,stroke:#4ade80,color:#bbf7d0
    classDef smtp       fill:#1e3a5f,stroke:#3b82f6,color:#bfdbfe
    classDef recipient  fill:#3b0764,stroke:#a855f7,color:#e9d5ff
Loading

🧭 Prerequisites

That's it. No server. No hosting. No credit card.


⚠️ Free Plan Limits

Know these before you start:

Cloudflare Email Routing SMTP2GO Free
Inbound (receiving) ✅ Unlimited
Outbound (sending) 1,000 emails/month
Daily send cap 200 emails/day
Custom addresses ✅ Unlimited
Catch-all rule ✅ Yes
SMTP credentials 1 user
Cost 🆓 Free forever 🆓 Free forever

💬 Is this enough? For personal use, newsletters to a small list, contact forms, or side projects — yes, easily. If you need to send more, SMTP2GO paid plans start at $15/month for 50,000 emails.

📈 Scaling Path

If you outgrow the free tier, here's how to scale — no architecture changes needed, just swap the SMTP provider:

flowchart LR
    A["🌱 Personal\n< 1,000/mo"]:::free -->|"growing list"| B
    B["🚀 Small Business\n1k–50k/mo"]:::starter -->|"high volume"| C
    C["🏢 Production\n50k+/mo"]:::pro

    subgraph T1 ["Free Tier"]
        A
    end
    subgraph T2 ["Paid SMTP"]
        B
        C
    end

    classDef free    fill:#14532d,stroke:#4ade80,color:#bbf7d0
    classDef starter fill:#1e3a5f,stroke:#3b82f6,color:#bfdbfe
    classDef pro     fill:#3b0764,stroke:#a855f7,color:#e9d5ff
Loading
Stage Volume Recommended Service Est. Cost
🌱 Personal < 1,000/mo SMTP2GO Free ← you are here $0
📬 Growing up to 10,000/mo SMTP2GO Starter ~$15/mo
🚀 Small Biz up to 50,000/mo Resend or Brevo ~$15–20/mo
🏢 Production 100k+/mo Postmark or SendGrid ~$15–$50+/mo

🔁 Switching is painless — Cloudflare Email Routing (inbound) never changes. You only update the SMTP credentials in Gmail/Outlook and swap the 3 SMTP2GO CNAMEs in Cloudflare DNS for your new provider's records. Your hello@yourdomain.com address stays exactly the same.


🚀 Step 1 — Add Your Domain to Cloudflare

Cloudflare needs to manage your DNS. Your registrar stays the same — you just point it at Cloudflare's nameservers.

1.1 Add your site

  1. Log in → dash.cloudflare.com
  2. Add a site → enter your domain → choose Free plan
  3. Cloudflare scans your existing DNS records — review and continue

1.2 Update nameservers at your registrar

Cloudflare shows you two nameservers like:

aria.ns.cloudflare.com
bob.ns.cloudflare.com

Go to your registrar and replace the current nameservers with these.

GoDaddy: My Products → DNS → Nameservers → Change → Enter my own nameservers

Namecheap: Domain List → Manage → Nameservers → Custom DNS

⏳ Cloudflare usually activates within minutes. Full propagation can take up to 24h.


📥 Step 2 — Set Up Inbound Email ( Cloudflare Email Routing)

Makes hello@yourdomain.com forward to your real inbox — free, no receiving limits.

2.1 Verify your destination inbox

  1. Cloudflare Dashboard → Email → Email Routing → Destination addresses
  2. Add destination address → enter your Gmail or Outlook address
  3. Open the verification email Cloudflare sends and click the link ✅

2.2 Create your custom address

  1. Email Routing → Routing rules → Custom addresses → Create address
Custom address:  hello@yourdomain.com
Action:          Send to → you@gmail.com

Repeat for as many as you need:

hello@yourdomain.com   → you@gmail.com
info@yourdomain.com    → you@gmail.com
support@yourdomain.com → you@gmail.com

💡 Catch-all: Email Routing → Routing rules → Catch-all address → Edit → Send to → you@gmail.com → Enable ✅
Any address on your domain that doesn't match a rule (including typos) will still land in your inbox.

2.3 Enable Email Routing

  1. Email Routing → Settings → Enable Email Routing → Add records and enable

Cloudflare automatically adds and locks these records:

Type   Name   Content                                 Priority
MX     @      route1.mx.cloudflare.net                13
MX     @      route2.mx.cloudflare.net                37
TXT    @      v=spf1 include:_spf.mx.cloudflare.net ~all

🔒 These are managed by Cloudflare — you can't accidentally delete them.

✅ Done. Send a test email to hello@yourdomain.com — it should land in your inbox in seconds.


📤 Step 3 — Set Up Outbound Email ( SMTP2GO)

Lets you send from hello@yourdomain.com through Gmail or Outlook.

3.1 Sign up and add your sender domain

  1. Sign up at app.smtp2go.com
  2. Go to Sending → Verified Senders → Sender Domains → Add Sender Domain
  3. Enter yourdomain.com

SMTP2GO gives you 3 CNAME records to add in Cloudflare:

Type    Name                             Value
CNAME   em1234.yourdomain.com      →    em1234.smtp2go.net
CNAME   s1._domainkey.yourdomain.com →  s1.dkim.smtp2go.net
CNAME   track.yourdomain.com       →    track.smtp2go.net    ← optional

⚠️ Copy the exact values from your SMTP2GO dashboard — the above are examples only.

3.2 Add the CNAMEs in Cloudflare

DNS → Records → Add record for each CNAME:

  • Proxy status: DNS-only 🔘 — email records must never be proxied (orange cloud off)

3.3 Wait for verification

Back in SMTP2GO → Sender Domains → wait for ✅ Verified (usually 5–15 minutes).

3.4 Create SMTP credentials

SMTP Users → Add SMTP User → save your username and password for the next step.


📧 Step 4 — Connect to Gmail or Outlook

Option A — Gmail "Send mail as"

  1. Gmail → Settings ⚙️ → See all settings → Accounts and Import
  2. Send mail as → Add another email address
Name:           Your Name
Email address:  hello@yourdomain.com
☑️ Treat as an alias
  1. Next Step → SMTP configuration:
SMTP Server:   mail.smtp2go.com
Port:          587
Security:      TLS
Username:      your SMTP2GO username
Password:      your SMTP2GO password
  1. Gmail sends a verification code to hello@yourdomain.com → arrives in your inbox via Cloudflare → enter the code ✅

💡 No Gmail App Password needed — Gmail authenticates to SMTP2GO, not to itself.


Option B — Outlook / Apple Mail / Any client

Outgoing SMTP server:   mail.smtp2go.com
Port:                   587  (TLS)   or   465  (SSL)
Username:               your SMTP2GO username
Password:               your SMTP2GO password

If port 587 is blocked on your network, try: 2525 · 8025 · 80


🛡️ Step 5 — Add DMARC (Recommended)

Prevents spoofing of your domain. Takes 30 seconds. Do it.

Cloudflare → DNS → Add record:

Type:     TXT
Name:     _dmarc
Content:  v=DMARC1; p=none; rua=mailto:dmarc@yourdomain.com; fo=1; aspf=r; pct=100

Tighten the policy over time:

Week 1–4:    p=none        → monitor only, nothing blocked
Month 2:     p=quarantine  → suspicious mail goes to spam
Month 3+:    p=reject      → full protection, spoofed mail blocked

📊 Use Cloudflare → Email → DMARC Management to read reports and know when it's safe to tighten.


✅ Step 6 — Test Everything

Receive test:

Send any email to hello@yourdomain.com
→ Should arrive in your Gmail/Outlook within seconds ✅

Send test:

Gmail → Compose → From: hello@yourdomain.com → send to yourself
Check headers:
  ✅ SPF=pass
  ✅ DKIM=pass

Deliverability score:

  1. Visit mail-tester.com
  2. Send one email from your custom address to their test address
  3. Aim for 9/10 or 10/10 🎯

🗂️ DNS Records at a Glance

┌────────┬──────────────────────────────┬─────────────────────────────┬──────────┐
│ Type   │ Name                         │ Content                     │ Proxy    │
├────────┼──────────────────────────────┼─────────────────────────────┼──────────┤
│ MX     │ @                            │ route1.mx.cloudflare.net    │ DNS-only │
│ MX     │ @                            │ route2.mx.cloudflare.net    │ DNS-only │
│ TXT    │ @                            │ v=spf1 include:_spf.mx...   │ DNS-only │
├────────┼──────────────────────────────┼─────────────────────────────┼──────────┤
│ CNAME  │ em1234.yourdomain.com        │ → from SMTP2GO dashboard    │ DNS-only │
│ CNAME  │ s1._domainkey.yourdomain.com │ → from SMTP2GO dashboard    │ DNS-only │
│ CNAME  │ track.yourdomain.com         │ → from SMTP2GO (optional)   │ DNS-only │
├────────┼──────────────────────────────┼─────────────────────────────┼──────────┤
│ TXT    │ _dmarc                       │ v=DMARC1; p=none; rua=...   │ DNS-only │
└────────┴──────────────────────────────┴─────────────────────────────┴──────────┘

↑ Top 3 rows added automatically by Cloudflare.
  SMTP2GO rows use YOUR exact values from the SMTP2GO dashboard.

🔧 Troubleshooting

❌ Cloudflare says "Missing DNS records"

Go to Email → Email Routing → Settings and click "Enable Email Routing" → "Add records and enable". Cloudflare adds the MX and SPF records automatically.

❌ Forwarded emails not arriving in Gmail

Since July 2025, Cloudflare requires the sending domain to pass SPF or DKIM before forwarding. This is the sender's issue, not yours — ask them to fix authentication on their mail provider.

❌ SMTP2GO error: "503 unable to verify sender address"

You're sending from a domain not yet verified in SMTP2GO. Go to Sending → Verified Senders → Sender Domains and finish verification first.

❌ Gmail verification code never arrived

Gmail sends the code to hello@yourdomain.com, which goes through Cloudflare forwarding. Make sure Step 2 is fully complete before starting Step 4 — routing must be enabled and destination must be verified.

❌ SMTP2GO CNAMEs won't verify
  • Set proxy to DNS-only (grey cloud 🔘) in Cloudflare — not proxied
  • Copy values exactly from your SMTP2GO dashboard, not from this README
  • Wait 10–15 minutes and refresh

💡 Good to Know

  • 📨 Receiving via Cloudflare is free with no limits whatsoever
  • 📤 Sending via SMTP2GO free tier: 1,000 emails/month, 200/day
  • 📬 Add multiple addresses — hello@, info@, work@ — all to one inbox
  • 🪤 Enable a catch-all in Cloudflare to catch any address on your domain
  • 🔐 Start DMARC at p=none, move to p=reject after 1–2 months of clean reports
  • 🚫 Never proxy email records in Cloudflare — always DNS-only for MX and CNAMEs

📚 Resources

Resource Link
Cloudflare Email Routing Docs developers.cloudflare.com/email-routing
SMTP2GO Knowledge Base support.smtp2go.com
DMARC Management Cloudflare Dashboard → Email → DMARC
Deliverability Tester mail-tester.com
DNS Lookup Tool mxtoolbox.com/SuperTool

footer

⭐ Star this repo if it saved you from paying for email hosting!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors