Sending emails through phpmailer is causing error

The problem is my website was working fine till I added it to Cloudflare… Now it won’t send emails through phpmailer… Anytime it wants to send email it loads for a while and show “The connection to the origin web server was made, but the origin web server timed out before responding. The likely cause is an overloaded background task, database or application, stressing the resources on your web server. To resolve, please work with your hosting provider or web development team to free up resources for your database or overloaded application.”

Make sure that the hostname that phpmailer is using to connect to your mail server is not proxied in Cloudflare. It may be set to your domain name by default, when localhost or a subdomain (such as mail, not proxied in Cloudflare) would be better.

Thanks for responding, how do I check and correct this?

You’ll need to look at the code on your server for where the mail host is defined.

$mail->Host here…

Oh yes of course… That way the exact format I followed, to connect to stamp and send mail

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