Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

How to extract mail_ids from bcc field

by jesuashok (Curate)
on Jul 06, 2007 at 06:36 UTC ( [id://625202]=perlquestion: print w/replies, xml ) Need Help??

jesuashok 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: How to extract mail_ids from bcc field
by atemon (Chaplain) on Jul 06, 2007 at 07:58 UTC

    I think this could be slightly off-topic, but worth answering.

    If your program is reading mails from "Sent Items" you can extract Bcc info like other fields (To & Cc)

    In the second case where your program is reading mails from "reader's" end(i.e. the client has received the mail and you're trying to see who else the mail was sent to) You Can NOT get info. See the RFC 2821 for SMTP. The relevant part is quoted below.

    7.2 "Blind" Copies.

    Addresses that do not appear in the message headers may appear in the RCPT commands to an SMTP server for a number of reasons. The two most common involve the use of a mailing address as a "list exploder" (a single address that resolves into multiple addresses) and the appearance of "blind copies". Especially when more than one RCPT command is present, and in order to avoid defeating some of the purpose of these mechanisms, SMTP clients and servers SHOULD NOT copy the full set of RCPT command arguments into the headers, either as part of trace headers or as informational or private-extension headers. Since this rule is often violated in practice, and cannot be enforced, sending SMTP systems that are aware of "bcc" use MAY find it helpful to send each blind copy as a separate message transaction containing only a single RCPT command.

    There is no inherent relationship between either "reverse" (from MAIL, SAML, etc., commands) or "forward" (RCPT) addresses in the SMTP transaction ("envelope") and the addresses in the headers. Receiving systems SHOULD NOT attempt to deduce such relationships and use them to alter the headers of the message for delivery. The popular "Apparently-to" header is a violation of this principle as well as a common source of unintended information disclosure and SHOULD NOT be used.

    Connecting the servers also won't work as the Bcc is handled by the "Sending" server. You may get Bcc info, if the sending server is NOT sticking to the RFC.

    --VC

Re: How to extract mail_ids from bcc field
by tirwhan (Abbot) on Jul 06, 2007 at 07:33 UTC
    I suspect this could be slightly off-topic

    And I suspect there may be faulty reasoning in there somewhere. You fail to specify whether you are trying to extract the Bcc field from messages which have been sent or received. If the former (i.e. you're extracting the headers from mails in the clients "Sent" box), it should work exactly the same way you're already extracting the other headers. If the latter (i.e. the client has received the mail and you're trying to see who else the mail was sent to) I suggest you sit back and reflect on the purpose and implementation of the Bcc field (repeated blows to the head with a blunt object may aid in this reflection).


    All dogma is stupid.
      Hi, I have used a shorcut key in lotus notes 3 yrs back, which helped me check the names of the person in BCC where in the email was marked to me 2 more persons. I was able to trace it was actually sent to approx 7 people. But currently I am unable recolloect the shortcut key. Will surely try to trce and revert. If you get an answer for the same do revert.
        Hi, Could you pls mail me if u get any details on how to get the e mail ID's from BCC field. I have received a e mail want to know to whom and all its marked. my e mail id is amitkanyadi@rediffmail.com
        Hi, if you could recollect those steps pls forward the same to my personal id, mathiewk@gmail.com, i suspect, which ever mail i receive from my colleague all are marked bcc, I would like to view those.. pls help me out... thanks

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://625202]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (6)
As of 2024-04-19 12:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found