Skip to content
Advertisement

Is there anything which tell me email is viewed by user which I send from my website in php?

I want to built a functionality which tells me that watever email sent from my website is viewed or read by user.

I saw one solution online which is about sending an image in the email and when email is read and image is opened then we have to trigger a call to our system.

But whatif image is never opened.

P.S. Email could be open in any gmail/outlook/thunderbird any.

Any help and idea would be appriciated.

Advertisement

Answer

I believe an image is the best way to do it, the user wouldn’t have to actually open the image to record it as read. When the user opens the email, the image will load by sending a request to the src attribute which you could set as a php endpoint, for example…

<img src='http://www.example.com/mailread.php?userId=212'>

The php script would then contain some logic to record that the user has read the email and serve the image.

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement