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

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re: Getting Email Notification
by atcroft (Abbot) on Mar 03, 2005 at 19:41 UTC

    If you add a Disposition-Notification-To header, filled in with your address (with the same address format as your From header), then many email clients MAY send a read receipt when the message is read. From the email you get back, read the headers to find out what machines it has went thru to get to you. That having been said, many email clients either ignore or do not implement returning read receipts, or ask for confirmation before sending, so the reader may not permit the receipt.

    Beyond this, I would suggest a look at the appropriate RFCs. While there are such things as web bugs and such, such things tend to draw large amounts of ire from those who vigorously defend their privacy, and, because such devices are commonly used by spammers, may cause your messages to be classified as spam, possibly preventing your message from reaching its recipient(s).

    I suspect, however, that if you reexamine your application you may find that you do not need to know the actual machine the message was read from, just that the message was received and opened (but this is a guess).

Re: Getting Email Notification
by phroggy (Monk) on Mar 03, 2005 at 22:27 UTC

    Do you have access to the POP3/IMAP server the recipient will be using to check their mail? You can parse server logs to see when they check their mail and where they were coming from - although this will generally only tell you that they logged in, without telling you which messages they downloaded. A Webmail system will also have logs, and may indicate individual messages somehow.

    You can send e-mail in HTML format with an <img> tag which will load a small graphic on a web server you control (you can copy http://phroggy.com/graphics/null.gif if you want), and make a CGI script to serve the graphic and send you notification, for example:

    #!/usr/bin/perl # send notification here my $gif=`cat null.gif`; print "Content-type: image/gif\n\n$gif";

    However, be aware that because this technique is frequently abused by spammers, all decent e-mail clients give the option to disable loading images this way.

    Finally, consider sending a message with a link to a web page that the recipient must click on in order to read your message. The link they click can take them to a CGI which will send you notification - but you won't get automatic notification that they've received the e-mail itself, just that they've clicked the link in the e-mail (which they aren't guaranteed to do).

    for $a(-2,12){for $b(0..7){$c=0;$_?hex substr(ef7fa1866706caeff0228940 +2844, 2*$_+$a,2)&2**(7-$b):0 and $c+=2**(7-$_)for(0..7);print chr $c;}}
Re: Getting Email Notification
by dorward (Curate) on Mar 04, 2005 at 09:50 UTC

    See Tracking Email Views - this is mostly the same problem, with the additional issue of tracking the IP of the user's computer. The short answer is "You can't" (and its due to the way email works, not to any limitation of Perl).