bobdole has asked for the wisdom of the Perl Monks concerning the following question:

Hello, I am using Net::SMTP to send messages in my cgi/perl script and I was wondering if there was a way I could request a return receipt when the email is sent out. I checked the man pages and I really didnt see anything, was wondering if anyone had any suggestions. Thanks in advance.

Replies are listed 'Best First'.
Re: request a return receipt
by ghenry (Vicar) on Apr 13, 2005 at 16:05 UTC

    You can do this with:

    $smtp->datasend("Disposition-Notification-To: \ to.me\@domain.com");

    Read this: Sending Mail the Net::SMTP Way, and look for Return Receipts

    Walking the road to enlightenment... I found a penguin and a camel on the way.....
    Fancy a yourname@perl.me.uk? Just ask!!!
      Thanks for the quik response. I realize a return receipt isnt full proof on who has read it or not but thats what my employer wanted, heh so shall it be done. Thanks for the link ghenry I think that is going to do it for me.
Re: request a return receipt
by g0n (Priest) on Apr 13, 2005 at 16:05 UTC
    SMTP as a standard doesn't specify read receipts, so its unlikely you'll be able to - unless you can fiddle the header in some way to con those (mostly MS or X.400 oriented) clients & servers that support it. Try sending a message with a read receipt set, and examine the message in its raw form.

    g0n, backpropagated monk
Re: request a return receipt
by Mutant (Priest) on Apr 13, 2005 at 16:13 UTC
    As others have alluded, return reciepts are not part of the standard, which means clients are under no obligation to send a reciept. Most email clients will - by default - give the user an option of whether they want to return a reciept or not if one is requested.

    In other words, don't rely on reciepts as an indication of who has or hasn't read your email.
Re: request a return receipt
by gellyfish (Monsignor) on Apr 13, 2005 at 16:03 UTC

    There is nothing about 'return receipts' in the SMTP Specification, If by 'return receipt' you mean that you get a 'delivery notification' - I think you mean this however a) I think you will have to implement it yourself and b) I'm not sure that there is much software support for it.

    /J\

Re: request a return receipt
by johnnywang (Priest) on Apr 13, 2005 at 17:35 UTC
    There is a hack to do this, the infamous email bug. Warning: I've never used this, and I'm not recommending it. It's used by many spammers to check whether some email addresses are active or not, I'm not sure whether it's still being used: if your receipient allows html in their email, you can embed a bug in the email (basically an <img/> tag to point to a logging script on your http server), whenever the user opens an email, your logging script will get a hit.
      Nowadays, 99% of email clients (including Outlook, and the big web mail clients, hotmail, yahoo, etc) won't load images by default. The user has to click a button to load the images. So images are pretty much useless for email tracking. There's pretty much no way to track who reads your email these days. (Which isn't really a bad thing :)