http://www.perlmonks.org?node_id=206422

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

Hi,

I've developed an eMarketing system that sends email to registered users. Now, is there a way to detect with a Perl script from what email address the message is being opened?

This, without having to manually insert the email address into a query string on a Perl script.

Thanks,
Ralph.

Replies are listed 'Best First'.
Re: Detecting an email address
by Aristotle (Chancellor) on Oct 18, 2002 at 21:07 UTC

    If you mean getting a confirmation that the mail was read, then it can be done, if I take your question literally, then no.

    But the ways to achieve that have nothing to do with Perl, and it's an evil thing to want. In either case, if I knew you were doing this, I'd go offline before opening your mail - if I did so at all.

    It is none of your business if folks in your userbase choose not to disclose their real email address to you.

    Makeshifts last the longest.

      Actually, depending on your E-mail Client, it may be possible to specify via preferences that acknowledgements are never sent.

      --Jim

        I'm not referring to sending mail with a receipt notification header. But I'll leave it at that.

        Update: the method waswas-fng detailed was what I meant; using a webbug. I wanted to avoid it being mentioned, but oh well.

        Makeshifts last the longest.

Re: Detecting an email address
by nothingmuch (Priest) on Oct 18, 2002 at 20:45 UTC
    You need to know the email address to know the email address - as logic implies.
    When a user registers, if they supply an email address, you can just keep it in some kind of database, and then fetch it. Have the database accessible by username, and then you can simply match when needed.

    -nuffin
    zz zZ Z Z #!perl
Re: Detecting an email address
by waswas-fng (Curate) on Oct 18, 2002 at 21:15 UTC
    Some pammers tend to place an img tag in the body of the email that really loads a cgi script that outputs a 1x1 jpg, with a creative url they can track mail messages opening and log RCPT TO: activity. It also helps us that like to track down spammers see where they really are coming from. =) so go for it.

    -Waswas
      Of course, webbugs are easy to defeat if you've disabled all scripting in your email client (or it doesn't support HTML) and you've set your firewall to only allow it to connect to set mail servers on set ports (ie Outlook can only connect to ports 25 and 110 - all other access is blocked by my firewall: therefore webbugs on port 80 will fail).
      I think that can be considered an attack, and could cause the both of you trouble if put to a legal test.

      I think heavy consideration of the users' privacy, the lawfulness of such unpermitted entry, and the necessity of the act should be made before implementing.

      -nuffin
      zz zZ Z Z #!perl
Re: Detecting an email address
by foxops (Monk) on Oct 18, 2002 at 21:03 UTC
    You might want to have your script filter out addresses like asdf@asdf.net while your at it :)