bendurber Posted December 4, 2007 Share Posted December 4, 2007 Hi, I am using the mail function and want to add a delivery request so that I know the message was delivered. This functionality is available in MS Outlook and seems to add the following into the message headers: 'Return-Receipt-To: "Name" <email>'. If I replicate this in my php code it doesn't seem to do anything. Any help would be much appreciated Regards Ben Quote Link to comment https://forums.phpfreaks.com/topic/80163-delivery-notification-using-the-mail-function/ Share on other sites More sharing options...
revraz Posted December 4, 2007 Share Posted December 4, 2007 Searching google returned this http://www.phpbuilder.com/columns/equazcion20070502.php3 Quote Link to comment https://forums.phpfreaks.com/topic/80163-delivery-notification-using-the-mail-function/#findComment-406289 Share on other sites More sharing options...
cooldude832 Posted December 4, 2007 Share Posted December 4, 2007 yes you could add a header for it, however not all clients send this receipt back. Quote Link to comment https://forums.phpfreaks.com/topic/80163-delivery-notification-using-the-mail-function/#findComment-406294 Share on other sites More sharing options...
bendurber Posted December 4, 2007 Author Share Posted December 4, 2007 Thanks for the link revraz but unfortunately most email clients don't download the images when the message is opened. cooldude832 what would that header be? If you request a delivery receipt from Outlook you almost always get a notification dont you? Thanks Ben Quote Link to comment https://forums.phpfreaks.com/topic/80163-delivery-notification-using-the-mail-function/#findComment-406304 Share on other sites More sharing options...
revraz Posted December 4, 2007 Share Posted December 4, 2007 Most clients wont send back a receipt either. Thanks for the link revraz but unfortunately most email clients don't download the images when the message is opened. cooldude832 what would that header be? If you request a delivery receipt from Outlook you almost always get a notification dont you? Thanks Ben Quote Link to comment https://forums.phpfreaks.com/topic/80163-delivery-notification-using-the-mail-function/#findComment-406306 Share on other sites More sharing options...
cooldude832 Posted December 4, 2007 Share Posted December 4, 2007 Its not a guarantee that is all I am say, find the header of an email with one and just add it to the header of your email Quote Link to comment https://forums.phpfreaks.com/topic/80163-delivery-notification-using-the-mail-function/#findComment-406311 Share on other sites More sharing options...
bendurber Posted December 5, 2007 Author Share Posted December 5, 2007 I have been looking into this a little more and it seems that the delivery notification is bounced from the server and not client program. For instance if I am not logged into my hotmail account and I then send it an email from outlook within a few seconds I get a delivery notification. I cant figure out why requesting a receipt in the email header works for Outlook but not my server side script. Thanks Ben Quote Link to comment https://forums.phpfreaks.com/topic/80163-delivery-notification-using-the-mail-function/#findComment-406804 Share on other sites More sharing options...
cooldude832 Posted December 5, 2007 Share Posted December 5, 2007 if you are mailing stuff like <?php $to = "[email protected]"; $subject= "Some email"; $body = "test Message"; $headers = "X-Type: 1.0"; if(mail($to,$subjet,$body,$header)){ echo "It worked"; } else{ echo "It died."; } ?> if it gets throguh and echos "it worked" that means you simply didn't have a sytnaxical error in your php, but you could have an invalid header. The receipeint mail box might report errors, I known my webmail does when I view the full headers. You shoul be able to see the recievers errors and fix them Quote Link to comment https://forums.phpfreaks.com/topic/80163-delivery-notification-using-the-mail-function/#findComment-406971 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.