Once the PHP mail function concludes without an error code the message has been accepted by the MTA (postfix, sendmail or whatever is your favourite) the interaction between your script and the MTA has ended.
Once the SMTP message is in the mail queue it will be tried for immediate delivery and may actually be delivered immediately, or delivery could fail immediately, but the message can also sit in the queue (for minutes, hours or even days) due to transient problems before final delivery or failure.
In case of a (long temporary) failure the normal behaviour of a MTA would be to send a delivery notification to the sender. No failure notification would signify succesful remote delivery (where the message may still be (silently) discarded).
You can monitor the mailbox of that sender and for instance filter delivery notifications to a PHP script that will categorise them and upload them to your database.