Free-ish and Custom Email

"How to" on setting up CloudFlare and Gmail to create a nice, custom, email.

on Aug 2, 2022, takes 2 minutes to read.

Tags

No tags

Wait, what? This is a post detailing the process of setting up cloudflare email forwarding, adding Gmail's (free) SMTP server, and adding it to your existing email client. By the way, this isn't a tutorial on using Google Workspace, and is an active effort to not use it.

But first, I have to explain what this is, and how I found it...

Backstory and Explanation

I was excited when I noticed this in my cloudflare sidebar (after finally setting up cloudflare):

The CloudFlare Email Forwarding Beta.

After running through the setup wizard, I could send myself emails! But I realized that I couldn't send emails back (at least with that address). So I "googled it" and found that you could setup Gmail's SMTP server (a.k.a. a simple mail transport protocol server) to send my emails. And I also setup spark to send my emails too.

Step 0: Get a Domain

If you didn't realize this already, you need a domain to send your emails from. Gmail's is gmail.com, Apple/iCloud uses icloud.com, Outlook uses outlook.com (among others), etc. You have to own the domain to setup an email under it. I bought reboot-codes.com from Dream Host for cheap with free WHOIS privacy protection (not an ad, I just really like their registration).

I then linked it with my existing netlify site through cloudflare. That just involved setting the name servers to cloudflare's. Then I set a flattened CNAME (a.k.a. ALIAS) record for the apex domain (@) to apex-loadbalancer.netlify.com; and another CNAME record for www to reboot-codes.netlify.app. (I also added the domain to Netlify which gave me a free Let's Encrypt SSL certificate, nice!)

Step 1: Setup CloudFlare Email Forwarding

This involves opening the cloudflare dashboard and choosing my domain. Then click on the "Email" link in the sidebar; and setup forwarding (its a wizard, so it's not that hard), it has to be a Gmail address for the next step to work!

Step 2: Setup Gmail SMTP

If you send an email to the address you setup, you will recive it at the address you selected in step 1. This step allows you to send emails from that address.

Step 3: Add the Gmail SMTP Server to CloudFlare

For obvious reasons, you need to add the Gmail SMTP server to your domain's DNS settings. Just add to the/replace the existing value with the following value for your (usually) apex domain's TXT value:

v=spf1 include:_spf.google.com include:_spf.mx.cloudflare.net ~all

Extra: Add the Email to Spark

Spark by Readdle is a great email client for Mac, iOS/iPadOS, Android, and Windows (soon). In spark, you can add the new email address as an alias to your Gmail. Note: you should not have set the email as an alias in Gmail, only in Spark.