Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CloudFlare & PHP mail() function... where do they go? [closed]

I have a shared hosting account with JustHost, hosting several websites with embedded contact forms that rely on the PHP mail() function.

After enabling CloudFlare (via JustHost's cPanel) none of the emails sent via PHP mail() are going through. Since JustHost handle all the DNS settings via cPanel, I can't change any settings on the CloudFlare website without disconnecting JustHost.

Emails sent from other accounts work fine, but any sent by PHP mail() are not received. Before I enabled CloudFlare everything worked fine.

Anyone know of a way to prevent this? I really only want CloudFlare for the CDN.

For now I've had to disable CloudFlare until I can find a solution. :(

UPDATE: Seems this was an error with the php.ini mail from header not being set correctly. JustHost were able to correct the issue for me.

like image 588
PlasmaDan Avatar asked Jan 26 '14 17:01

PlasmaDan


1 Answers

This could be happening because you haven't updated your DNS MX records.

Check here for a solution:

https://support.cloudflare.com/hc/en-us/articles/200168876-My-email-or-mail-stopped-working-What-should-I-do-

Also check here for a more detailed answer on editing MX records:

https://support.cloudflare.com/hc/en-us/articles/200169086-How-do-I-add-or-edit-mail-or-MX-records-

like image 136
Filippos Karapetis Avatar answered Oct 01 '22 02:10

Filippos Karapetis