Switching to a new web hosting company and migrating your sites, databases, email and domain settings can be a daunting task for those that haven’t done a large number of them.   This is one of those areas where experience can make a huge difference in the success of the migration and the time it takes.  Many hosts offer free migration, but we always prefer to do it manually so each piece can be verified and tested and so we know everything was covered.  Also most importantly so we can make the DNS changes at the best time to minimize any downtime while it propagates.
Email has always been a piece that can really complicate things.   For those that use their web host as their mail server you need to get all those messages moved over.

The Best Way To Migrate Mail from One Web Server to Another Host.

Use cPanel to Copy over the /etc & /mail directories.

cPanel is key here.  I am a big fan of cPanel, and do not like the current trend of do away with it for proprietary interfaces or command line only.  Especially for WordPress sites, it is an essential tool for managing sites & hosting in my book.  A massive time saver.  Also a reason I do not recommend the Managed WordPress hosting services, such as Kinsta and WP Engine that don’t use a typical cPanel setup.

  1. Use cPanel File Manager.  Compress the /etc and /mail directories.
  2. Download the file
  3. Upload the file to the new host through cPanel file manager and
  4. Extract them in the root and replace the existing etc & mail directories.
  5. Done.  Connect via IMAP and carry on.

Shout out to the awesome support team at InMotion Hosting for this tip.
If you need help with migrating to a new host contact me.

Mail Routing Settings in cPanel

There is a problem we often see with new websites or after a hosting switch where email notifications from forms are not being received by the site owner.  Assuming there are no error messages appearing,  the first test is to try using an email recipient address that uses a different domain than the website.  If that successfully is received, it is likely you are using mail servers other than your host and therefore you need to set your hosting configuration to be a Remote Mail Exchanger rather than local.
By default most hosts assume that you will be using the server for email as well and it will set the DNS within the hosting company so that your web server is also your mail server.  So what happens here is that when a form is submitted from your website, it looks at the local DNS settings and then sends the email to itself, expecting the web hosting account to be your mail server.  The message never actually makes it out into the external DNS world to realized that your mail server is actually somewhere else like Google, a corporate server, or 3rd party hosted mail somewhere else.

REMOTE MAIL EXCHANGER in cPanel

  1. Log into cPanel
  2. Under MAIL > Advanced MX Editor you should see options to set your Email Routing
    Mail Routing Settings in cPanel
  3. Set it to Remote Mail Exchanger and Click Change.
  4. Test it again.  You may need to wait a little while for the change to take affect.  You can try testing right away, but maybe 30 minutes is a reasonable time.

 

Is Your Send From email using your domain?

Check the From address on your form settings and use an email address that also uses the site domain.  Some hosts require this, rather than just using the users email input into the form.
 

SMTP Authentication

If both of those methods fail, try SMTP Authentication.  In the event that your mail server is blocking mail from the web server, it may consider not a Safe Sender since it thinks only the main mail server should be sending email using the domain.  This is typically in corporate environments running their own mail servers.  SMTP Authentication will use the credentials and mail server settings of a valid account and will actually connect and relay the mail through the main mail server rather than use the web server.
There are plugins available for WordPress to make this pretty easy.