Jump to content

Delivery Notification using the mail() function


bendurber

Recommended Posts

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

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

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

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

 

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.