[GH-ISSUE #6] Is this still working though? #3

Open
opened 2026-03-04 00:01:28 +03:00 by kerem · 6 comments
Owner

Originally created by @savokiss on GitHub (Jun 30, 2023).
Original GitHub issue: https://github.com/Sh4yy/cloudflare-email/issues/6

I have deploy my this worker into production.

And added a SPF record and a _mailchannels record to my domainA.

And added a custom domainB to my worker.

Then try to POST https://domainB/api/email the body below:

{
	"to": "myown@gmail.com",
	"from": "support@domainA",
	"subject": "Hello World",
	"text": "Hello World"
}

But it always showed Internal Server Error.

Is there anything I missing to use this email sender?

Originally created by @savokiss on GitHub (Jun 30, 2023). Original GitHub issue: https://github.com/Sh4yy/cloudflare-email/issues/6 I have deploy my this worker into production. And added a `SPF` record and a `_mailchannels` record to my domainA. And added a custom domainB to my worker. Then try to POST `https://domainB/api/email` the body below: ```json { "to": "myown@gmail.com", "from": "support@domainA", "subject": "Hello World", "text": "Hello World" } ``` But it always showed `Internal Server Error`. Is there anything I missing to use this email sender?
Author
Owner

@Sh4yy commented on GitHub (Jun 30, 2023):

Have you set up the new _mailchannels DNS record?

https://github.com/Sh4yy/cloudflare-email#setup-spf

<!-- gh-comment-id:1615277764 --> @Sh4yy commented on GitHub (Jun 30, 2023): Have you set up the new _mailchannels DNS record? https://github.com/Sh4yy/cloudflare-email#setup-spf
Author
Owner

@savokiss commented on GitHub (Jul 2, 2023):

Yes, I have set up this record too. But it is still not working, just respond the Internal Server Error message.

<!-- gh-comment-id:1616413224 --> @savokiss commented on GitHub (Jul 2, 2023): Yes, I have set up this record too. But it is still not working, just respond the `Internal Server Error` message.
Author
Owner

@andreresende commented on GitHub (Jul 15, 2023):

Same error here. Error 500

<!-- gh-comment-id:1636669341 --> @andreresende commented on GitHub (Jul 15, 2023): Same error here. Error 500
Author
Owner

@V-ed commented on GitHub (Jul 15, 2023):

It happened to me too. I initially used the Deploy with Workers button and that never worked. Upon inspecting the code on cloudflare quick edits feature, I noticed the worker deployed was actually the default hello world. Maybe I configured it badly, dunno.

I then tried to use the 4 steps of cloning the repo locally to deploy it with wrangler and after properly setting up the SPF record as well as the now required TXT Domain Lockdown error (and since I was already using cloudflare to redirect my domain's email, I had to merge them so it looked at the end like this : v=spf1 a mx include:relay.mailchannels.net include:_spf.mx.cloudflare.net ~all), and after setting up both it seems to work fine for me!

Make sure to also always use a from mail coming from your domain, for some reason I thought I could send emails with the from field as any email, obviously that doesn't work haha


So yeah, maybe the Deploy with Workers button is broken, that I can't confirm, but it works for me after passing by and upvoting this issue initially.

<!-- gh-comment-id:1636684811 --> @V-ed commented on GitHub (Jul 15, 2023): It happened to me too. I initially used the `Deploy with Workers` button and that never worked. Upon inspecting the code on cloudflare quick edits feature, I noticed the worker deployed was actually the default hello world. Maybe I configured it badly, dunno. I then tried to use the 4 steps of cloning the repo locally to deploy it with wrangler and after properly setting up the SPF record as well as the now required TXT [Domain Lockdown error](https://support.mailchannels.com/hc/en-us/articles/16918954360845-Secure-your-domain-name-against-spoofing-with-Domain-Lockdown) (and since I was already using cloudflare to redirect my domain's email, I had to merge them so it looked at the end like this : `v=spf1 a mx include:relay.mailchannels.net include:_spf.mx.cloudflare.net ~all`), and after setting up both it seems to work fine for me! Make sure to also always use a `from` mail coming from your domain, for some reason I thought I could send emails with the `from` field as any email, obviously that doesn't work haha --- So yeah, maybe the `Deploy with Workers` button is broken, that I can't confirm, but it works for me after passing by and upvoting this issue initially.
Author
Owner

@andreresende commented on GitHub (Jul 15, 2023):

Yes, it working here after configuring domain lockdown. I think it is mandatory now.

<!-- gh-comment-id:1636686990 --> @andreresende commented on GitHub (Jul 15, 2023): Yes, it working here after configuring domain lockdown. I think it is mandatory now.
Author
Owner

@V-ed commented on GitHub (Jul 15, 2023):

Confirmed mandatory for Cloudflare workers (from Domain Lockdown error) :

image

<!-- gh-comment-id:1636688579 --> @V-ed commented on GitHub (Jul 15, 2023): Confirmed mandatory for Cloudflare workers (from [Domain Lockdown error](https://support.mailchannels.com/hc/en-us/articles/16918954360845-Secure-your-domain-name-against-spoofing-with-Domain-Lockdown)) : ![image](https://github.com/Sh4yy/cloudflare-email/assets/16652915/dff240db-717d-4d8d-afd6-0576a0208e0f)
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/cloudflare-email#3
No description provided.