Troubleshooting PHP Mail Sending to Same Domain as Web Server

Here’s the scenario:

You’ve just moved your website or a client’s website from one server to another.  The server migration went great and everything seems to be working as intended.  You’re on a cPanel based virtual private server (VPS) and the website is fast and stable.

After a day of the website running perfectly, you notice that you’re not getting the e-mails from the server like you used to.  So you test out a contact form on your website to see if you’ll get an e-mail.

You get nothing.

You’ve checked the DNS records for the domain and everything looks great.  You’re still getting e-mails from other people, but all emails that are sent from the server have completely stopped.

What could be causing this?

The Problem:

The web server isn’t sending out PHP emails to addresses on the same domain.  i.e. Contact form sending email to

The easy, yet easily overlooked answer:

Adding the MX records into the cPanel.

  1. Enter into the cPanel
  2. Go the the cPanel Mail section
  3. Search for MX Entry Maintenance, sometimes there is no text above the icon.
  4. Select the related domain
  5. Change Email Routing to Remote Mail Exchanger.

That should do it, but if that doesn’t work for you, check out the link below.

More detailed answer here:

Related Posts

Write a comment