Forum Moderators: coopster

Message Too Old, No Replies

Not receiving email sent from PHP mail() after cPanel migration?

         

ichsie

5:46 am on Nov 29, 2014 (gmt 0)

10+ Year Member



I just moved my site example.com from one host to another by cPanel account backup and restore. Name servers are changed a few hours ago. [email]info@example.com[/email] is hosted at Google apps with MX records pointing to aspmx.l.google.com., etc.

Name servers change seems to have propagated because the website is working fine from the new server. However, there's something weirdly wrong with emails:

1. Emails sent from my Gmail my-name@gmail.com (a native Gmail account) to info@example.com are correctly received.
2. I can then log in Google apps to view the inbox of info@example.com, see the message and send a reply back to my-name@gmail.com which is again correctly received.
3. Emails sent to my-name@gmail.com by PHP mail() from the new server are correctly received, with proper 'mailed-by' and 'signed-by' fields in Gmail.
4. Emails sent to info@example.com by PHP mail() from the new server are NOT received at all, NOT EVEN in spam.

This is really weird because both [email]info@example.com[/email] and mail() seem to be working fine individually but when you mail() to [email]info@example.com[/email] the message just doesn't arrive.

Any idea why? Is it the DNS propagation or is there anything internally wrong with my server or code? Do I need just wait or do I need to do something?

ichsie

3:24 am on Nov 30, 2014 (gmt 0)

10+ Year Member



Seems it's the problem of DNS propagation that had yet to be completed. That's why mail() couldn't resolve info@example.com. I waited some more time and it's working now.

tangor

5:24 am on Nov 30, 2014 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



All too often we think the "net" works at light speed. It doesn't. :)

Glad it worked out! Note to others: Wait at LEAST 24 hours before worry, and better yet, 48 hours. It does take time to propagate the DNS...