It is simply said: this is not possible using the PHP mail() command.
the return value from mail() simply indicates whether the mail was successfully forwarded by the MTA but was not sent. If, for example, your MTA is postfix and the postfix service is stopped, mail() will gladly return true , because the order in which the mail message will be delivered. However, it will never be sent if postfix does not start manually (or is even configured correctly).
If you really want to make sure mail has been sent, you need to talk to MTA via sockets. There is a framework for this.
source share