2

I've recently moved my website to a new server.

I've changed the DNS record to use the new server for the website but, I'm still using the old one as a mail server. So, basically, the DNS is set up to the new server for the normal web traffic and to the old one for email (MX on the DNS).

Now, I have a contact form on Wordpress that should be able to use one of my email address.

I've set up the email address to work as SMTP on my server but it seems not working.

I've not added records for that on the DNS; I've just the record that directs the mail traffic to the old server. Do I need and, in case, which records should I've to add?

1

Providing your old server is properly configured then the problem shouldn't be with the DNS records. Moving your website to the new server should have only required changing the A records for example.com and www.example.com, not whatever subdomain is pointed to your mail server.

Double check that your mail server is configured for something like smtp.example.com or mail.example.com and that the IP address is for the old server. Then make sure in the mail server settings, it knows to accept mail on that address.

If the WordPress site was able to send mail via SMTP prior to the move, you should ensure that your mail server has the new server whitelisted for sending mail and that the site is using the correct authentication methods.

| improve this answer | |
  • The fact is that, before moving the website to the new server, everything was working well with Wordpress using the email address of the website to send email from the contact form as well as reset password email and stuff – NicoCaldo Nov 16 '19 at 16:12
  • Check that the SMTP server defined in WordPress isn't localhost – GeoffAtkins Nov 16 '19 at 16:16
  • I'm pretty sure it is set as localhost. Is there a way to change it? (as my old server SMTP needs authentication to work) – NicoCaldo Nov 16 '19 at 18:29
  • Depends what you're using for your mail. IIRC WP doesn't support SMTP out-of-the-box and you'll have needed a plugin to make that work. The SMTP server address should be in the settings for that plugin. – GeoffAtkins Nov 16 '19 at 19:56
0

So the problem was a misconfiguration of Email Routing on cPanel.

The solution has been, selecting my subdomain email on Email Routing in cPanel and instead Automatically Detect Configuration I need to choose Local Mail Exchanger

Now the mails via the SMTP and subdomain are correctly received from the mail server.

The DNS servers were configured in the right way tho.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.