Form is not sending emails when cloudflare is enabled

Our form built in react using axios, is not sending emails once we activate cloudflare. Without cloudflare it works fine.

We’ve checked our DNS settings, all seems to be good. We have also created a firewall rule to allow all black-box.io POST requests. Have attached screenshots for more detail. Have also gone through existing online cloudflare documentation, and can’t seem to find a solution. You can also test this out for yourself: go to black-box.io and click on the ‘let’s talk’ button on the nav, and then click the send a message to open up the form I’m referring to.



1 Like

It looks like the POST is blocked. I see you’re trying a Firewall Rule to Allow the POST.

Are you seeing that POST blocked in your Firewall Event Logs? If so, then click on it and you should see which setting is blocking the request.

1 Like

@sdayman Thanks. I did check, and the logs show that the firewall rule is allowing the request, as per this screenshot: https://i.imgur.com/Mx0euO8.png.

Any other ideas?

Hi there @MoreHelp , need some assistance here please.

In your very first image, you show a 503 in the headers. What’s showing up in the Response itself? I’d like to see if it’s a Cloudflare challenge screen.

Weirdly, it’s showing a heroku error response page. The site is hosted on heroku. https://i.imgur.com/TdJY6IR.png

That would explain why Firewall Log is showing the Allow – the request is making it through Cloudflare.

Thanks @sdayman , I’m going to investigate this further with heroku. Looks like I may have setup the custom domain incorrectly there. Will update this thread with the solution if it comes through.

1 Like

We’ve gone through our heroku settings and made one or two tweaks. Everything seems fine there. On cloudflare there are two alerts on the dns settings page. We don’t have a SPF record set. Do you think this could be the issue? https://i.imgur.com/ZkBt6n8.png

We have also added a few more dns records. Still not working. https://i.imgur.com/I5UyPAf.png

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.