How to setup mailchannels integration on Cloudflare Pages app with a custom domain?

I made it work on workers, nothing complicated there, but it doesn't seem to work with pages. Mailchannels just returns Error: Mailchannels API rejected: Failed to send email: 550 5.7.1 This sender is not authorized to send from.... I've set up the _mailchannels TXT record like this v=mc1 cfid=namespace.workers.dev cfid=namespace2.workers.dev cfid=customdomain.com and it still does not work with the custom domain.
9 Replies
maddsua
maddsuaOP•11mo ago
Am I missing something?
Cyb3r-Jak3
Cyb3r-Jak3•11mo ago
Have you tried adding the pages.dev domain as an allowed one?
Erisa
Erisa•11mo ago
this^ you need to add the projects pages.dev subdomain as the cfid, as that is where the function runs
maddsua
maddsuaOP•11mo ago
gonna try that right now That's why we need the dev community =) Thanks folks! It's such an easy solution but still I didn't think of it
Rubi
Rubi•11mo ago
hi @maddsua are you using MailChannels on production? have you experience any rate limit?
maddsua
maddsuaOP•11mo ago
Hey! I don't send huge amounts of email, but I've seen stats with 100k successful requests per day. It's not like you're gonna lose something if you try it, right?
Rubi
Rubi•11mo ago
all I need is just peace of mind in the weekend 😄
MylesBolton
MylesBolton•8mo ago
would there be any other reason this error is getting thrown ? my txt record is
v=mc1 cfid=project.pages.dev cfid=namespace.workers.dev cfid=customdomain.com cfid=sub.customdomain.com
v=mc1 cfid=project.pages.dev cfid=namespace.workers.dev cfid=customdomain.com cfid=sub.customdomain.com
and the error i get back is
POST https://project.pages.dev/api/contact - Ok @ 08/04/2024, 16:08:17
(log) Email send status: 500
(log) Email send response: {
errors: [
'Failed to send email: 550 5.7.1 This sender is not authorized to send from customdomain.com. See https://bit.ly/domain-lockdown. cfid=project.pages.dev'
]
}
POST https://project.pages.dev/api/contact - Ok @ 08/04/2024, 16:08:17
(log) Email send status: 500
(log) Email send response: {
errors: [
'Failed to send email: 550 5.7.1 This sender is not authorized to send from customdomain.com. See https://bit.ly/domain-lockdown. cfid=project.pages.dev'
]
}
no idea why or how but it started working i thin the dns was cached and it was serving the previous record i set
Erisa
Erisa•8mo ago
Please open a new topic instead of bumping an old one. You can reference this one in your new one by copying the link
Want results from more Discord servers?
Add your server