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
|