email sent with php mail() function, it arrives around 12 hours later?

dakanadaka

Registered
Feb 21, 2018
1
0
1
Amsterdam
cPanel Access Level
Website Owner
What is the first thing to do when email which are sent from php mail() function arrive 12 hours later to mailbox.
So yesterday I sent email and after 12 hours or less it arriaves in my mailbox? Where to check first? I have also WHM access.

I think problem was when we updated to 7.1 php version from php 5.6.
Sending from php mail() function works, but sends the email later on like 12 hours later
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,227
463
Hello,

Do you have root access to the server? If so, you can search for the message in /var/log/exim_mainlog to get a better idea of the time frame and actions that occurred after sending the message. EX:

Code:
exigrep MessageSubject /var/log/exim_mainlog
You may also find this thread helpful:

Reading and Understanding the exim main_log

Thank you.