
DIY Disposable Email Service using Cloudflare
*RANT*
It’s quite ridiculous how much I hate promotional emails.
The flow of unwanted junk email is never-ending - and I’m sick of it.
Never in my life have I opted in to “Receive promotional emails”.
Yet, I still receive goddamned promotional junk.
And the goddamned welcome emails.
And the goddamned product updates.
And the goddamned survey requests.
And the goddamned “We haven’t seen you in a while” emails.
And the goddamned “(My boss will kill me for this); Not a joke, I swear” emails.
The best part is that the Unsubscribe button never seems to be working as well.. /s
*END OF RANT*
However, I recently stumbled upon a hidden gem within Cloudflare called Email Routing.
I slowly realized that I had found the golden path to mastering my email inbox.
Cloudflare Email Routing
As a full-stack developer and micro-SaaS builder, I’m a big fan of Cloudflare.
I rely on Cloudflare for all my domains and side-hustles.
Cloudflare Email Routing is an awesome feature that lets you create “Custom addresses” that can forward emails to your primary inbox.
Why this is awesome:
- You can create a custom email addresses. Use them to sign up for an online services. If you start receiving junk, just delete the custom address. Bam. Inbox silenced.
- You only need one primary inbox. Continue using your Gmail, Apple Email,Yahoo, or whatever you prefer. No more juggling between “spam.stuff.101@gmail.com” AND “private.johnsson@gmail.com”; just stick with private Johnsson and create custom disposable addresses that forwards all the emails to it.
If you already have a domain in Cloudflare you can start using this in no-time.
How to use Cloudflare as a DIY Disposable Email Service
Prerequisites:
- Cloudflare account
- A domain connected to it
Step by step:
- Log in to Cloudflare and select your domain
- Go to Email => Email Routing => Routes
- VOILÁ. Here you have it. Create, update, delete "Custom addresses" (a.k.a disposable email addresses).
The bad part (and a solution)
Cloudflare’s UI is nice and all, but it’s not optimized for managing disposable emails. There’s just too many features packed in there screaming for your attention.
It can take some time (haven't timed how much) to manage your disposable emails by browsing to cloudflare.com, clicking “Log In”, enter credentials, use 2FA, then finally navigating through the UI jungle to reach the destination.
If you're like me and are thinking “‘some time’?! That’s way too much time!”.
Rest assured. I built an open-source app for this reason, called x2.email. The app's sole purpose is to manage disposable emails through Cloudflare's API.
x2.email is blazingly fast, minimalistic and privacy-friendly: https://github.com/jessetinell/x2.email
Either clone the repo and host it yourself or use the readily available version at x2.email.
I'm also adding sweet features like random-generated addresses and auto-deletion of addresses (might come soon).
Traditional Disposable Email Services vs. DIY
Pure disposable email services like minuteinbox.com are fantastic. I cherish them, especially when I know I won't need ongoing access to the inbox itself. They're perfect for:
- Grabbing a discount codes
- Downloading free promotional e-books
- Testing a new SaaS tool before committing
However, for services I plan to use long-term (like Spotify or HBO), the ability to "mute" or disable my email address is a game-changer.
Since I'm already a user of Cloudflare and have some domains to spare - it's a 100% "free" and privacy-friendly alternative. So why the f not.
Please give x2.email a try and feel free to reach out at hey@jessetinell.com.