There is no easy/direct way of doing what you want. FYI
The easiest thing you can check is if the email is properly sent via your own mail server. If you use PHP's mail
function to send your email, set it up like:
$emailSent = mail(...);
The emailSent variable will be a boolean indicating whether the mail server could or could not send the email.
But this will not tell you if the email gets bounced or if the email gets opened, or if it is actually received. Frankly, only bounced/opened matter. If an email is not bounced, it is safe to assume it was received. If an email is opened, it is safe to assume it was received. If an email is bounced, it is safe to assume it was not received. Etc. Detecting Bounce
I have not done this, I am just pondering. You could set the "from" and "reply to" parameters of the email to a specific email address (firstname.lastname@example.org); something generic that you don't actually use. You can then set up your server to route/"pipe" emails sent to this address to a PHP script on your server. I know this can be done; but I have not explored it myself.
Now if you can get this email to your PHP script... you can then scrape the message to see if it is a "bounce" message. Why? If an email gets bounced, the opposing mail server will usually send the bounce message back to you (via the from/reply to address). If it IS a bounce message... scrape whatever info you need from the email and mark it as such in your DB. Detecting Receive
This is also something you cannot easily/quickly do. But here's my thoughts on it. Place an "image" in your email message, a la:
Then, create the PHP script. Have it use the parameter (ref; etc) to uniquely identify the email (you would need to store such info in your DB when emails are sent, FYI). Whenever this script gets requested, it represents an emailing being read/loaded, or being "opened". So, setup the script to update your DB to reflect this. When someone requests this "file", it should grab the identifier and update your DB to show it was "received" and "opened". Then, to be "kosher", have your script output some junk image data (probably a simple white image of 1px by 1px with proper headers/etc).
Hope that can help.