Isaac Shea
CDCloudflare Developers
•Created by Isaac Shea on 7/19/2023 in #workers-help
Workers mailer not sending to Gmail domains
I've been using the MailChannels worker integration to send emails to users for the last 12 months, and have only today discovered that this endpoint seemingly cannot send emails to
@gmail
domains.
From what I can tell it doesn't seem to have any issues with any other domain endings:
- My test account is an @icloud
domain and has been working flawlessly
- I've tested it with my university email address (ending in @qut.edu.au
) and it seems to also be working flawlessly
I've tried with both my own and a friend's Gmail email addresses, and both have seemingly lost the email somewhere in transit. It's not available in the spam folders, nor is the worker erroring when sending to those addresses (I receive a 202 Accepted
response every time).
My only theory at the moment is that Gmail has far more strict guidelines as to what mail it accepts and blocks, and that the MailChannels partnership has been abused previously so has been silently blocked.
My implementation closely follows the example implementation available on the Cloudflare Blog:
https://blog.cloudflare.com/sending-email-from-workers-with-mailchannels/
Does anyone have any ideas or similar experience? I genuinely don't know what's causing this issue or how it can be resolved without moving away from Workers entirely for mailing tasks, which I would like to avoid.11 replies