First of all, great product! I love the Chilkat libraries and have been using them for quite a while now.
Unfortunately, I am now having some trouble with the Chilkat.Email class. It appears as though the BCC fields are not included in GetMime (and also GetMimeBinary). I am trying to persist a Chilkat email to disk by writing the bytes from GetMimeBinary and then reading them back in and using Email.SetFromMimeBytes to restore it to its initial state. However, when I do this, the BCC fields get stripped out of the email. If I run the following code:
Dim chi As New Chilkat.Email chi.AddTo("Test", "firstname.lastname@example.org") chi.AddBcc("Test", "email@example.com") MsgBox(chi.GetMime)then it shows this:
MIME-Version: 1.0 Date: Mon, 16 Nov 2015 13:46:15 +1030 Message-ID: 24AC72D1B6DBA501A1CC6F0ED0D921DAD96219D1@XPS-15 Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) To: "Test" <firstname.lastname@example.org>Is this how it is supposed to work? If not, is there any way that it could be changed to include the BCC field?
Thanks. The difference between a "CC" recipient and a "BCC" recipient is that "BCC" is blind-carbon-copy. "blind" means that the other recipients should be unaware of the fact that the BCC recipients also received the email. If BCC is part of the MIME header, then it defeats this purpose -- because the BCC recipients can be seen.
If the application wants to persist the BCC addresses in the MIME, then a good solution is to add a header field containing the BCC recipients via the AddHeaderField method, and then call GetMime. For example:
Dim chi As New Chilkat.Email chi.AddTo("Test", "email@example.com") chi.AddBcc("Test", "firstname.lastname@example.org") chi.AddHeaderField("bcc_addrs","email@example.com") MsgBox(chi.GetMime)When an app wants to load the MIME and send to the BCC addresses, it could do this:
Dim chi As New Chilkat.Email chi.AddTo("Test", "firstname.lastname@example.org") bccAddrs = chi.GetHeaderField("bcc_addrs") chi.RemoveHeaderField("bcc_addrs") chi.AddMultipleBcc(bccAddrs) ...