Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is this still working though? #6

Open
savokiss opened this issue Jun 30, 2023 · 6 comments
Open

Is this still working though? #6

savokiss opened this issue Jun 30, 2023 · 6 comments

Comments

@savokiss
Copy link

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": "[email protected]",
	"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?

@Sh4yy
Copy link
Owner

Sh4yy commented Jun 30, 2023

Have you set up the new _mailchannels DNS record?

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

@savokiss
Copy link
Author

savokiss commented Jul 2, 2023

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

@andreresende
Copy link

Same error here. Error 500

@V-ed
Copy link

V-ed commented 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.

@andreresende
Copy link

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

@V-ed
Copy link

V-ed commented Jul 15, 2023

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

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants