PHP: Check who had read sent email?

前端 未结 12 1521
感情败类
感情败类 2020-12-01 06:53

I am sending email to some users and wants to know who had read it, means if some one had read that email then a log file will maintain which contain the email address of th

12条回答
  •  青春惊慌失措
    2020-12-01 07:48

    Add Header to email:

    Disposition-Notification-To: you@yourdomain.com
    

    As mentioned above it's not reliable and it's better to do something like this:

    
    

    And log it in a database, although again this is restricted by the email client's ability to show images and sometimes it may even put the mail into junk because it doesn't detect an image... a workaround that would be to actually outputting an image (say your logo) at the end of that script.

    Edit: A quick lookup at the phpmailer class gave me the following:

    $mail->ConfirmReadingTo = 'yourown@emailaddress.com';
    

    but it's the same as the Disposition-Notification-To method above.

提交回复
热议问题