Http 500 error on mail.php

Hi everybody, I am new here my name is Danny. When I submit my php mail form I get a blank page with the message HTTP 500 ERROR on url ‘mail.php’, while it was giving a thank you page in the past. Also, mail is not being sent. I am new, clueless and about to be desperate. My origin hoster Bluehost simply wipes it away as a Cloudflare issue > go to them. Please help with an answer like you’re dealing with a 5-year-old? Or, Cloudflare team resolve this for me please if it is a common thing? S.O.S.

Hi Danny!

Are you using SSL in full (strict) mode?
What’s your domain name?
Your mail script is on the same hostname?

Hi Paul, the domain is I don’t have a clue if ssl is in strict mode or not. I am sorry. The mailform is in the root where all pages are located. It is strange since it worked in the past and did not make any changes. Thank you so much for your feedback (also a Dutchie like me?)

Hi q-stands,

Yup also a Dutchie :slight_smile:
Do you have SSL enabled on your webserver?
What’s this page saying : SSL/TLS | | Account | Cloudflare - Web Performance & Security?
Please have on your end also SSL enabled with a valid SSL certificate.

Hi Paul, I am on the road but wil check out the ssl when I am back. Did you mean ssl in cloudflare or bluehost? Thanks.


On Cloud Flare and BlueHost.
If there is no valid SSL config on Bluehost, then Cloud Flare SSL will not work as well.

Drive safe!

May I ask are the e-mails working and sending over :grey: cloud (DNS only) hostname (DNS record like A mail) or over a proxied (:orange:) one?

If the .php script is using some :orange: (proxied) hostname, it woudln’t work as far as Cloudflare does not proxy e-mail traffic.

  • by default, it should send from the server itself, other issues which could be due to the SPF record, etc.

Have you checked your error.log file? If that so, this error comes from your origin host/server and not from Cloudflare itself.
Kindly, can you post a screenshot of this error?

Have they changed anything, like PHP version or upgrade, or some PHP module like mail() or sendmail() functions not being enabled by default, etc.?

Just in case, may I also suggest looking into below articles to re-check and make sure your e-mails propperly function:

Hi guys,

Sorry for the delay in answering fellows. Frankly, I don’t have much knowledge of IT/Web stuff and how I can repair my mail form. Is one of you maybe available for some hands on support? If yes, i will give my login codes for both Cloudflare and Bluehost. I can even send my entire website in a zip. This will be highly appreciated. My work is just starting up again after 1,5 years of Covid misery and want to have a good start with my new website and a cool mail form that actually works.

I would advise against publicly sharing such information. Plus, the forum is not really intended to find paid support. There are dedicated platforms for that.


Hi Sandro,

My intention was not to find paid support, just some friendly support or advice. I am clueless what to do next, since my knowledge is not into websites and server errors. Sorry for that, I will try to find another way then. No hard feelings…if Bluehost simply shuts me off during a support chat because I use Cloudflare ‘go to them’ and Cloudflare forum cannot help me out then I am with my back against the wall.

Try pausing cloudflare, and see if that fixes the issue!

Error 500: internal server error

Error 500 generally indicates an issue with your origin web server. Error establishing database connection is a common HTTP 500 error message generated by your origin web server. Contact your hosting provider to resolve.


Provide details to your hosting provider to assist troubleshooting the issue.

However, if the 500 error contains “cloudflare” or “cloudflare-nginx” in the HTML response body, provide Cloudflare support with the following information:

  1. Your domain name
  2. The time and timezone of the 500 error occurrence
  3. The output of from the browser where the 500 error was observed (replace with your actual domain and host name)

If you observe blank or white pages when visiting your website, confirm whether the issue occurs when temporarily pausing Cloudflare and contact your hosting provider for assistance.

You talking about this error?
Screenshot 2021-09-01 9.35.03 AM


Hi Appleslayer,

Yep this is exactly the error I get. Do you know how to tackle this monster? It doesn’t say a thing about Cloudflare. Much appreciated…Cheers.

Have you tried pausing Cloudflare to see if that fixes the issue?
To temporarily pause Cloudflare:

  1. Navigate to the Overview tab in the Cloudflare dashboard.
  2. Click Pause Cloudflare on Site at the bottom-right of the page under Advanced Actions.

Hi Appleslayer, yes I’ve tried that yesterday but no luck. The 500 error still occurs.

Are you saying that after you pause Cloudflare, you still get a 500 error? If so, and this after giving the Pause five minutes to take effect, then it’s definitely a server issue that has nothing to do with Cloudflare. And that is in line with this comment:

1 Like

Hi @sdayman!

I looked into it and its a coding issue.

Have a good day!

1 Like

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