phperror-handlingemailerror-detection

Is there a way to determine whether an e-mail reaches its destination?


I have a PHP script that sends critical e-mails. I know how to check whether the e-mail was sent successfully. However, is there a way to verify whether the e-mail reached its destination?


Solution

  • If you make the email HTML based, you can include images in it which contain URLs with information unique to the recipient. You could structure your application so that these URLs trigger some code to mark that particular email as read before returning the required image data.

    To be totally effective, the images would have to form a key part of the email, so that the recipient has to make their email client grab the images. You could also make the plain text part of the email just contain a URL to retrieve the full message, again allowing you to track receipt.

    How far you take these ideas depends on why you need to know it's been read and to what extent you want to potentially annoy the recipient with an email they can't cut'n'paste, read easily on mobile device, listen to with a screenreader, etc...