All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
MailChannels + Cloudflare Workers = Send Email for Free. Anyone tried?
Couple of days ago Cloudflare published a blog post and tutorial about creating Cloudflare Workers in partnership with MailChannels.
MailChannels has created an email sending service specifically for Cloudflare Workers that removes all the friction associated with sending emails. To use their service, you do not need to validate a domain or create a separate account.
But the absolute best part? Thanks to our friends at MailChannels, it is completely free to send email.
Worker:
export default { async fetch(request) { send_request = new Request('https://api.mailchannels.net/tx/v1/send', { method: 'POST', headers: { 'content-type': 'application/json', }, body: JSON.stringify({ personalizations: [ { to: [{ email: '[email protected]', name: 'Test Recipient' }], }, ], from: { email: '[email protected]', name: 'Workers - MailChannels integration', }, subject: 'Look! No servers', content: [ { type: 'text/plain', value: 'And no email service accounts and all for free too!', }, ], }), })
So as you can see there is no barrier left when it comes to sending out emails. You can copy and paste the above Worker or Pages code into your projects and immediately start to send email for free.
https://blog.cloudflare.com/sending-email-from-workers-with-mailchannels/
anyone tried it? is it really free to send? The blog post mentions about cloudflare IP too. So only cloudflare-enabled sites (orange cloud) could utilize this i suppose.
good-day!
Comments
Yes, you can use MailChannels with Cloudflare Workers to send email for free. We've tried it and it works great! You just need to set up a couple of workers to handle the sending and receiving of email messages.
MailChannels is a great service that allows you to send email without having to pay for it. It's perfect for when you want to send out a lot of emails, such as newsletters or mass emails. And since Cloudflare Workers is a serverless platform, you don't have to worry about setting up and maintaining your own servers.
I would highly recommend using MailChannels + Cloudflare Workers if you're looking to send email for free.
Didn't see anything regarding receiving. Does receiving works too? If so, it seems like you could also make some kind of self-hosted email service using D1 and/or Workers KV and Workers + MailChannels
https://blog.cloudflare.com/announcing-route-to-workers/
Only an announcement for now.
shit, that can actually be a game changer!
The closest you can get to receiving is using Cloudflare's email forwarding function to forward everything to another e-mail account, but nothing publicly available right now that works out of Workers or anything similar.
@jar your opinion on this?
Tis interesting and cool. I don't see myself in the use cases so it's probably more appealing to someone who does.
Hey everyone. For inbound filtering on Workers, stay tuned. Their new email routing function will definitely enable the creation of some pretty cool inbound mail handling and at low to no cost. We aim to help folks fill in the blanks with more functionality that works with Workers in the near future.
Oh, you're the guy.
Yeah, I’d love to see someone build an inbound service that uses Workers to drop messages directly into a mail store via HTTPS. Maybe even using Cloudflare’s new database. That would be cool.
This looks nice for some ad-hoc limited e-mails from processes with shutdown access to :25, however most of those big e-mail guys have HTTP API already
However things are confusing
To use their service, you do not need to validate a domain or create a separate account.
and there are examples with providing your ownFrom:
header. This will be a mess on filters, e-mails will be mass denied? Does CF somehow keep track of your domains so for example they won't allow you to e-mail from @fbi.gov?Let me try, but maybe not with fbi domain, just to be safe
EDIT: Yeah, no validation at all. RIP
Actually, this is what we do all day long for hosting providers. We have a lot of controls to stop spam and phishing, including computer vision tech that detects brand phishing.
I always prefer no validation for From headers. They're cosmetic and we all need to train users to not blindly trust them. Envelope senders have always been the real meat, From is just a toy. Can't be too long before email client devs start to recognize it.
The important part is catching abuse, limiting use cases just causes unnecessary friction.
Worker inbound routing coupled with a jmap implementation(none exists afaik for js) could be interesting, you would store your mails in their object storage, session data with kv-store. You can do this with aws ses and lambdas too right now though.
Workers KV is eventually consistent though. You are not guaranteed to read your own writes.
And how much would it cost?
Never take things for granted. We all know what happened, so we can't rely on free stuff.
What are the pricing plans for inbound and outbound (especially outbound) relayed via Workers?
Outbound is fully free as of right now. No need of authentication etc. - it just needs to come from a Cloudflare Worker. Inbound is yet to be seen.
CF workers seems to be increasingly more interesting for real-world use.
Maybe their upcoming sqlite db will have some answer to this.
Until you send too much. Then MailChannels will want to bill you.
Nothing is free.
All your emails are under monitor,they can stop you easily if you are sending spams.
Anyone care to explain everything what this is all about like I'am 5 yo?
Cloudflare workers is a serverless service, you write code and they run it for you.
Cloudflare added an api to send email via mailchannels.
You can use this api for free via cloudflare workers.
One more way to send spam. Thank you.
Not really much of issue for them, this is what mailchannel do, they will filter most of the spam before actually sending out. I am sure CF and MailC has figured out the math before releasing it to public.
trying this soon with workers
I have had a play with it (Workers are phenomenal) and I seem to have encountered quite a few early teething problems.
For anyone wanting to use it for something like sending an invoice - no attachments so no go.
It seems to struggle with multipart as well, when sending only text/html e-mails it has no problems, sending both text/plain and text/html it seems to fuck up.
Yes alpha quality at best, similar to R2 (a bit slow and bad S3 compatibility) but situation will probably improve in the next 6 months