Wallace
Wallace

Reputation: 651

BCC Field in Email Implementation

Recently we are creating an application for interpreting email contents, this application shall give us the TO addresses, CC addresses and BCC addresses.

When handling BCC field, we found it seems not able to get BCC addresses directly. Referring to RFC2822, MORE QUESTIONS arise.

 " There are three ways in which the "Bcc:" field is used. 
   In the first case, when a message containing a "Bcc:" field
   is prepared to be sent, the "Bcc:" line is removed even 
   though all of the recipients (including those specified
   in the "Bcc:" field) are sent a copy of the message...

   Finally, since a "Bcc:" field may contain no addresses, a 
   "Bcc:" field can be sent without any addresses indicating
   to the recipients that blind copies were sent to someone. "

Suppose an email is sent out as below adddresses

   To: [email protected]
   cc: [email protected] 
   bcc: [email protected]

My questions are, when the recipient [email protected] received its email, will there a "[email protected]" in the email source file? If yes, then what field it is placed? If not, then how is it possible for this email to the recipient when there is no any information about the "[email protected]"??

[update]
how can the email server know whose mailbox to deliver this email to, if the email message contains no information about the BCC recipient's email address, including the header part? how a server correctly forwards such an email?

Upvotes: 1

Views: 1070

Answers (2)

Anton Shepelev
Anton Shepelev

Reputation: 1011

My questions are, when the recipient [email protected] received its email, will there a "[email protected]" in the email source file?

It may be, and then it may be not, according to:

  1. section 4.5.3 of RFC 822,
  2. section 3.6.3 of RFC 2822, and
  3. section 3.6.3 of RFC 5322.

Including the entire original Bcc: field in the copy sent to the blind recipient(s) is only one of the possible options.

If not, then how is it possible for this email to the recipient when there is no any information about the [email protected]??

The address is spedified the in Bcc: field of the message that client sends to the SMPT server. It need not be present in the messages send by SMTP server to the destination addresses.

Upvotes: 0

tripleee
tripleee

Reputation: 189417

The content of an email does not necessarily contain any information about its recipients. During message transport, this information is carried in the message envelope, which is then discarded on delivery.

What you are pursuing cannot be done reliably (although many person-to-person messages obviously contain the information in the headers).

Many mailing list messages are good examples, especially those which are delivered to multiple recipients in the same domain.

Upvotes: 2

Related Questions