Reliable Zero-Cost Proxied Email With Cloudflare Workers (SMTP)

jskinnerd

Regular Member
Joined
Jul 21, 2023
Messages
205
Reaction score
299
Problem & Solution
Cloudflare Workers don't let you emails conveniently, so I created an SMTP client from scratch in a worker.
This means free-proxied serverless email.

What are the advantages?
- No more reason to use platforms like SendGrid, Twilio, Mailchimp, etc. for sending emails.
- Mail is proxied at zero cost, because Cloudflare is just one big free proxy.
- Reliable as hell due to zero dependencies and written in Rust
- 100% zero-cost operation if you have rotating SMTP credentials. This will be implemented on my platform, Leetforms (i'll talk about this in a later post).

Does it work?
I'm currently using this for my dad's business and am relieved we no longer depend on form providers nor email APIs.
More peace of mind, more control, and more money for us. :D

However, as this was just a proof-of-concept, I'm still brainstorming things to do with it.

Dear BHW, what features or recommendations you have for this?

I appreciate y'all! :)
 
Lol that's hilarious are you using email workers or regular workers.?

I'm assuming looks like any other proxy but ports 587.

That's interesting but what about sending key signatures and the like wouldn't that not show up correct? I'm not an expert on nails.
 
Lol that's hilarious are you using email workers or regular workers.?

I'm assuming looks like any other proxy but ports 587.

That's interesting but what about sending key signatures and the like wouldn't that not show up correct? I'm not an expert on nails.
Yeah it uses regular workers on port 587.

Also I'm no expert either but if you're referring to SSL forward proxy, it handles it fine. Cloudflare just automatically provides certificates and I take advantage of their built-in TLS on sockets.
 
Hi,

as a mailer I not able to understand anything here lol.

So your tool doesnt require any SMTP since it uses cloudflare?

Can you explain a bit more
 
Cloudflare Workers are awesome.

The free tier has a very a generous 100,000 requests per day.

There are many interesting things that can be done with serverless code.

I'm currently using workers for GeoIP and form file uploads to KV storage.
 
“rotating SMTP credentials” : so you still need SMTP server, right?

Just use Cloudflare worker to send email with different location, I don't think it's too hard.

Everyone in the mail market knows: SMTP server is the key.
 
“rotating SMTP credentials” : so you still need SMTP server, right?

Just use Cloudflare worker to send email with different location, I don't think it's too hard.

Everyone in the mail market knows: SMTP server is the key.
Well yes, you need an SMTP server or you can't receive mail.
 
Problem & Solution
Cloudflare Workers don't let you emails conveniently, so I created an SMTP client from scratch in a worker.
This means free-proxied serverless email.

What are the advantages?
- No more reason to use platforms like SendGrid, Twilio, Mailchimp, etc. for sending emails.
- Mail is proxied at zero cost, because Cloudflare is just one big free proxy.
- Reliable as hell due to zero dependencies and written in Rust
- 100% zero-cost operation if you have rotating SMTP credentials. This will be implemented on my platform, Leetforms (i'll talk about this in a later post).

Does it work?
I'm currently using this for my dad's business and am relieved we no longer depend on form providers nor email APIs.
More peace of mind, more control, and more money for us. :D

However, as this was just a proof-of-concept, I'm still brainstorming things to do with it.

Dear BHW, what features or recommendations you have for this?

I appreciate y'all! :)
What about setting up Cloudflare workers mTLS between 2 workers instead of a server, can that be done?
 
Problem & Solution
Cloudflare Workers don't let you emails conveniently, so I created an SMTP client from scratch in a worker.
This means free-proxied serverless email.

What are the advantages?
- No more reason to use platforms like SendGrid, Twilio, Mailchimp, etc. for sending emails.
- Mail is proxied at zero cost, because Cloudflare is just one big free proxy.
- Reliable as hell due to zero dependencies and written in Rust
- 100% zero-cost operation if you have rotating SMTP credentials. This will be implemented on my platform, Leetforms (i'll talk about this in a later post).

Does it work?
I'm currently using this for my dad's business and am relieved we no longer depend on form providers nor email APIs.
More peace of mind, more control, and more money for us. :D

However, as this was just a proof-of-concept, I'm still brainstorming things to do with it.

Dear BHW, what features or recommendations you have for this?

I appreciate y'all! :)
Hi,

Can you PM me please? Im interested in getting this done for my email setup.

Thanks
 
can i suggest a good mail server to test ?
Stalwart Mail Server is in active development
works Linux or MacOS or Windows or Docker
support proxy

I think can be used to test Cloudflare Workers (SMTP)

we just need testing and a good how to guide
 
Back
Top