Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


MailChannels + Cloudflare Workers = Send Email for Free. Anyone tried?
New on LowEndTalk? Please Register and read our Community Rules.

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?

JasonMJasonM Member
edited May 2022 in General

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!
cloudflare mailchannels racknerd reviews

Comments

  • emghemgh Member

    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.

  • sanvitsanvit Member

    @emgh said: and receiving

    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

  • 0xbkt0xbkt Member

    @sanvit said:

    @emgh said: and receiving

    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.

    Thanked by 2JeDaYoshi sanvit
  • sanvitsanvit Member

    @0xbkt said:

    @sanvit said:

    @emgh said: and receiving

    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?

  • jarjar Patron Provider, Top Host, Veteran

    @hyperblast said:
    @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.

    Thanked by 1TimRoo
  • @mc_ksimpson said:
    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.

  • JabJabJabJab Member
    edited May 2022

    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 own From: 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 :D

    EDIT: Yeah, no validation at all. RIP :(

  • @JabJab said:
    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 own From: 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 :D

    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.

  • jarjar Patron Provider, Top Host, Veteran
    edited May 2022

    @JabJab said:
    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 own From: 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 :D

    EDIT: Yeah, no validation at all. RIP :(

    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.

  • cadddrcadddr Member

    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.

    Thanked by 1mc_ksimpson
  • 0xbkt0xbkt Member

    @cadddr said: session data with kv-store

    Workers KV is eventually consistent though. You are not guaranteed to read your own writes.

  • MikePTMikePT Moderator, Patron Provider, Veteran

    @mc_ksimpson said:
    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.

    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?

  • @MikePT said:

    @mc_ksimpson said:
    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.

    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.

  • SirFoxySirFoxy Member

    CF workers seems to be increasingly more interesting for real-world use.

  • cadddrcadddr Member

    @0xbkt said: Workers KV is eventually consistent though.

    Maybe their upcoming sqlite db will have some answer to this.

  • MikePTMikePT Moderator, Patron Provider, Veteran

    @JeDaYoshi said:

    @MikePT said:

    @mc_ksimpson said:
    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.

    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.

    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.

  • LeviLevi Member

    Anyone care to explain everything what this is all about like I'am 5 yo?

  • @LTniger said:
    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.

    Thanked by 2Levi JasonM
  • LeviLevi Member

    @NoComment said:

    @LTniger said:
    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.

    Thanked by 1ralf
  • SaahibSaahib Host Rep, Veteran

    @LTniger said:
    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.

    Thanked by 20xbkt JasonM
  • JasonMJasonM Member

    @emgh said: I would highly recommend using MailChannels + Cloudflare Workers if you're looking to send email for free.

    trying this soon with workers

  • LordSpockLordSpock Member, Host Rep

    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

    Thanked by 1JasonM
Sign In or Register to comment.