How can I ensure that the user read the e-mail?
i want to be sure that the user reads the email using php.. by sending for me a feedback on my mail that the user reads the mail ..
| SitePoint Sponsor |


How can I ensure that the user read the e-mail?
i want to be sure that the user reads the email using php.. by sending for me a feedback on my mail that the user reads the mail ..


This can be considered invasion of user privacy.
AFAIK, it's just an additional header.
PHP Code:$aMailHeaders[] = sprintf(
'%s: %s',
'Disposition-Notification-To',
'<yourEmailAddress@domain.com>'
);
@AnthonySterling: I'm a PHP developer, a consultant for oopnorth.com and the organiser of @phpne, a PHP User Group covering the North-East of England.


Like so.
PHP Code:$aMailHeaders[] = sprintf(
'%s: %s',
'Disposition-Notification-To',
'<yourEmailAddress@domain.com'
);
mail('to', 'subject', 'message', implode(chr(13).chr(10), $aMailHeaders));
@AnthonySterling: I'm a PHP developer, a consultant for oopnorth.com and the organiser of @phpne, a PHP User Group covering the North-East of England.


It converts the array of headers into a string delimited by \r\n.
@AnthonySterling: I'm a PHP developer, a consultant for oopnorth.com and the organiser of @phpne, a PHP User Group covering the North-East of England.


look in my source code there is many headers (from and charset....) and i want to put the last line u have send to me so where i can put it..???
i tried to make the followingPHP Code:
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=windows-1256\r\n";
$headers .= "From: Website Request <info@example.com>\r\n";
$ok = mail($to,$kind, $message, $headers);
and it works correctly but without from , chareset... did u got it???PHP Code:$aMailHeaders[] = sprintf('%s: %s','Disposition-Notification-To','<yourEmailAddress@domain.com>');
$ok = mail($to,$kind, $message, , implode(chr(13).chr(10), $aMailHeaders));
also when i read the mail it show me an alert that there will be respont send to yourEmailAddress@domain.com do u want to send.....
i dont want this alert i dont want the user to know there is a respond mail sent to the administrator
To be fair, nearly all email clients block any attempt to contact an external source when reading email - for this exact reason.
Personal ethics aside, asking for a read receipt is the best you're going to get.
PHP Code:$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=windows-1256\r\n";
$headers .= "From: Website Request <info@example.com>\r\n";
$headers .= "Disposition-Notification-To: <info@example.com>\r\n";
$ok = mail($to,$kind, $message, $headers);
@AnthonySterling: I'm a PHP developer, a consultant for oopnorth.com and the organiser of @phpne, a PHP User Group covering the North-East of England.


the problem is that te user send for me that he read the mail... but i want to know that he reads the mail after reading it, not before reading it..
someone told me to attach an image and when the user downloads it , it will send for me a notification mail that the mail is read but i dont know how to do it..
how to set an image send mail on downloading into the user mail????
do u have any other ideea
also i dont want the attached image to be shown to the user .......
sorry for interruption
Many nefarious advertisers & spammers track emails by including a unique key on a resource which is loaded externally by a users email client, such as an image.
The remote script would then log access, therefore the sender would now know 2 things:-Code:<img src="trackOpenedEmail.php?id=123456789" />
- The email address is valid.
- The email was read by the recipient.
As such, most email clients now block access to remote resources when reading email unless explicitly told not to.
An alternative? What about sending a one off link, containing a unique key for the user to view the message online? Much like the PM system of a forum?
Code:You have received a message from SilverBulletUK, To view the message, click <a href="viewMessage.php?id=123456789">here</a> Thanks, Admin.
@AnthonySterling: I'm a PHP developer, a consultant for oopnorth.com and the organiser of @phpne, a PHP User Group covering the North-East of England.


Do u mean that i will attach from a page that have the send fuction???
but how coe an image to send mail??? iwill put the send mail function in a page.. but how i can make it related to the image to send the mail??
i know that i'm making N INTERRUPTION for but really thnx for ur help... i need to make this function quickly..
could you send for me a full example to stopping my interruption to you?
really thank you
Bookmarks