Using pages plugin mailchannels giving error

I'm trying to use the pages plugin mailchannels to make use of a form on my website and get the responses emailed to me however when submitting the form, I get this error.
10 Replies
jstn
jstn2y ago
Try setting up Domain Lockdown with the DNS rule - https://support.mailchannels.com/hc/en-us/articles/16918954360845-Secure-your-domain-name-against-spoofing-with-Domain-Lockdown- I'm also trying to get this working atm... I receive the same error lmk if you make any progress because I'm pretty stumped. I sent an email to support, will update if I figure anything out
Soham
SohamOP2y ago
Same it works on my other website so not sure why it doesn't work on this one It's the same code
jstn
jstn2y ago
I set copied that same function, changed the from part of it to my own domain, and set this DNS record but see the same as you. Not sure what else to try
Soham
SohamOP2y ago
same, i just gave up and switched to another form service
chriskealley
chriskealley2y ago
I have the same issue with mailchannels, have even added DKIM, anyone found a solution?
Chaika
Chaika2y ago
Make sure you have whitelisted your pages.dev, your functions will always count as executing on the pages.dev itself, even if you are using a custom domain, ex you want a record like: _mailchannels TXT v=mc1 cfid=xxxxx.pages.dev where xxxx is your pages project.dev, like _mailchannels TXT v=mc1 cfid=quick-test.pages.dev cc @chriskealley Mailchannels lockdown ref: https://community.cloudflare.com/t/introducing-mailchannels-domain-lockdown/523913
skoogeer
skoogeer2y ago
@chriskealley in our error message, you will find your cfid. Feel free to PM me with your cfid and I'll check our logs.
Chaika
Chaika2y ago
yea, sadly it looks like the mailchannels pages plugin does not pass the error or anything other then a generic failed, not on you of course but it makes it more confusing for them. It was made before lockdown The language on https://support.mailchannels.com/hc/en-us/articles/16918954360845-Secure-your-domain-name-against-spoofing-with-Domain-Lockdown- is a bit confusing as well, it's not always the workers.dev subdomain as the article says it is If it was a worker executed via its worker.dev url, then it would be their worker.dev. If it was a worker on a custom domain, then the custom domain zone would be right. That is, a worker running on worker.mydomain.com, where mydomain.com was the zone/website added, would have the cfid of mydomain.com Pages is special, and all Pages Functions, regardless if executed on the pages.dev or via a custom domain, have the cfid of the pages.dev, like xxx.pages.dev.
chriskealley
chriskealley2y ago
So I have got it working, If you are using a pages build, you need to add your pages.dev domain that your cloudflare project is created as to the CFID as @chaika.me & @ttul hinted above.
Eg, if you pages project has the domain - my-pages-site.pages.dev, add that to the TXT record _mailchannels TXT v=mc1 cfid=my-pages-site.pages.dev FYI I am not sure if this is needed but I also have the workers.dev record in the TXT record too.
Soham
SohamOP2y ago
Ah alright thanks
Want results from more Discord servers?
Add your server