0

I have to make a script in php.When i will send an email from my server(www.mydomain.com) to customer mail id (mycustomer@gmail.com), when mycustomer will read my mail i will get an message that mycustomer has read mail.more explain... When my mail will be delivered to mycustomer gmail.He will click on mail subject for reading purpose.Whenever he will click i will get an message or mail that mycustomer has read mail.How will i do this ? Thanks

Ajay_kumar
  • 29
  • 3
  • 5
  • possible duplicate of [How check our email has been read in webmail using PHP](http://stackoverflow.com/questions/3736079/how-check-our-email-has-been-read-in-webmail-using-php) – Pekka Nov 08 '10 at 14:07
  • There is no fail-safe way to do this. See the duplicate for some approaches – Pekka Nov 08 '10 at 14:07
  • Let me just explain why this is difficult, since nobody mentions that. A fool-proof solution to your question would be quite a privacy issue, giving information on whether an e-mail is read, when it is read, and most likely where. (using IP geolocation). This is exactly why e-mail clients initially block hot-linked images in the first place, and probably also why such a mechanism was not strictly designed into SMTP. – Pelle Nov 08 '10 at 14:29
  • Please elaborate on your situation, there may well be other solutions. Is the person you want to track a customer, or somebody that allows you to install software on their machine? In that case you might just write a userscript that can take care of it. – Pelle Nov 08 '10 at 15:23

2 Answers2

0

This is not possible, you can only check if the mail has been delivered to the sender inbox successfully or not.

Alternatively, you could implement a solution that requires the receiver to click a link when he opens and reads the mail, but this serves against the initial purpose I assume.

subZero
  • 5,056
  • 6
  • 31
  • 51
  • There are various methods like the (optional and totally legit) E-Mail receipt mechanism and the less legit "web bugs", but none of them is entirely foolproof. – Pekka Nov 08 '10 at 14:10
  • Can receiver server api can solve this problem ? Is any API is available on web also ? – Ajay_kumar Nov 08 '10 at 14:17
0

The closest you can get to this is to include a unique, hot-linked image in the email and then track when the image is accessed. This is no guarantee, however, since in gmail in particular the user will have to explicitly click "display images in this email".

As for actually sending mail in php: http://php.net/manual/en/function.mail.php

dreeves
  • 26,430
  • 45
  • 154
  • 229