contact form stopped working

tony84

Free Member
Apr 14, 2008
6,648
1
1,423
Manchester
Our contact form stopped working. I could not work out why or when so I removed it and have tried a few other plug ins and non work.
I have worked out what happened (I think) in that I moved our email hosting to a different system and so the mx records etc are pointing elsewhere.

I am trying a plug in and getting the error message wp_mail() returned FALSE. The server refused to send the mail.

Do you know how I fix it?
 
Assuming you have access to your cPanel?

If your recent email hosting change was from local-hosted to something like Microsoft 365, you'll need to access your Email Routing in cPanel.

Select the domain >
Instead of Local Mail Exchanger
Switch to
Remote Mail Exchanger
 
Upvote 0
Shopclicks' routing fix is the first thing to try, and if the host has already been switched to Remote Mail Exchanger and wp_mail() still returns FALSE, the reliable route is to stop relying on the server's own mail function altogether. Install WP Mail SMTP (or FluentSMTP), point it at your new email provider's SMTP settings (Microsoft 365 and Google Workspace both publish these; you'll need an app password rather than your normal login), and use the plugin's built-in test-email button. The error you're seeing is the server saying it will no longer relay mail for a domain whose MX now lives elsewhere, and SMTP through the new provider sidesteps that entirely. Two small things while you're in there: set the form's From address to an address on your own domain, otherwise the new provider will often refuse to send it, and once it's working, send yourself a test through the live form once a month. Contact forms fail silently, the business owner is the last person to find out, and a month of enquiries can go missing before anyone notices.
 
Upvote 0
I trust you both and all that, but if I select that, will I still get my emails on zoho?
I am a little nervous about changing things like that.
 
Upvote 0
Yes, you will. Your Zoho mail is decided by the MX records at your domain registrar, and those are already pointing at Zoho - that is why Zoho works now. The cPanel setting is only telling your web server "mail for this domain is handled somewhere else, don't try to deliver it locally", which is exactly the situation you're in. It doesn't touch the MX records and it can't stop Zoho receiving anything. Where people do get caught is the other way round: if it's left on Local, the server sometimes swallows mail addressed to your own domain (including the form's copy to you) instead of sending it out to Zoho. If you'd rather not touch cPanel at all, the WP Mail SMTP route above avoids it entirely - you put Zoho's SMTP details into the plugin and the form sends through your Zoho account like a normal email. Either way, send yourself a test through the live form afterwards and check it lands.
 
  • Like
Reactions: tony84
Upvote 0
If in doubt ... Ask your favourite AI model.

You can always switch it back if it doesn't solve the issue.

You'll also be able to go back to your original form plugin.

This is from the support section on the Zoho website:

We understand that you are using Zoho’s SMTP in your website for lead generation. If you do not receive emails from your website then, there might be chances that the emails are internally relayed. If the email has to be delivered to an external server, then the option”remote mail exchanger” has to be enabled in your website.

For checking If the email was delivered or rejected from our side, then the email has to reach our server first. If the website claims that the email was relayed to Zoho’s server, then kindly ask and share with us the SMTP relay logs. We will check and assist you further.

Kindly share the requested details by dropping an email to support(at)zohomail(dot)com.
Regards,

Kiran K Bhat


Zoho Mail Team.
 
  • Like
Reactions: tony84
Upvote 0
I have changed it, but it as come back with

wp_mail() returned FALSE. The server refused to send the mail.

Next Step: Contact your hosting provider.

I will give them a shout tomorrow unless anyone has any thoughts?
 
Upvote 0
Tony - two separate things are going on, which is why the routing change didn't clear the error. Shopclicks' point about the leftover "mail." MX record is about where incoming mail lands; worth tidying, but it isn't what produces "wp_mail() returned FALSE. The server refused to send the mail." That message is the sending side: the plugin is asking your web server's own PHP mail function to send, and the server is saying no (a lot of hosts disable or heavily restrict it). Talking to the host tomorrow is the right call if you want to keep using server mail - but you can sidestep the server entirely tonight. Install WP Mail SMTP (free), choose "Other SMTP", and put in Zoho's SMTP details from your Zoho mail settings (host smtp.zoho.eu for UK/EU accounts, port 465 with SSL, your full Zoho address as the username, and an app-specific password generated in Zoho rather than your login password). Send the plugin's test email, then submit the form yourself. Once that works, the form is sending through Zoho's servers, not your host's, so it keeps working whatever the host says about PHP mail. Your normal Zoho inbox is untouched by any of this.
 
  • Like
Reactions: tony84
Upvote 0
I got a company to sort out the mx records etc. Its a little beyond me this I think.
I will speak to my host tomorrow and see if they can fix it, if not I will have a chat with the company who moved everything over from cpanel to zoho mail.
 
  • Like
Reactions: Shopclicks
Upvote 0
Tony - two separate things are going on, which is why the routing change didn't clear the error. Shopclicks' point about the leftover "mail." MX record is about where incoming mail lands; worth tidying, but it isn't what produces "wp_mail() returned FALSE. The server refused to send the mail." That message is the sending side: the plugin is asking your web server's own PHP mail function to send, and the server is saying no (a lot of hosts disable or heavily restrict it). Talking to the host tomorrow is the right call if you want to keep using server mail - but you can sidestep the server entirely tonight.

Install WP Mail SMTP (free), choose "Other SMTP",
and put in Zoho's SMTP details from your Zoho mail settings (host smtp.zoho.eu for UK/EU accounts, port 465 with SSL, your full Zoho address as the username,
and an app-specific password generated in Zoho rather than your login password).

Send the plugin's test email, then submit the form yourself. Once that works, the form is sending through Zoho's servers, not your host's, so it keeps working whatever the host says about PHP mail. Your normal Zoho inbox is untouched by any of this.
Hi,

I have installed Fluentsmtp - do you know where I would get the password from?
 
Upvote 0
Upvote 0

Latest Articles