Rank: Newbie
Groups: Registered
Joined: 12/12/2019(UTC) Posts: 4
Hi all, I'm using EAsendmail in VB6/Windows 7. I'm trying to generate a mail which includes a BCC address. The following code ________________________________________________________ Dim oSmtp As New EASendMailObjLib.Mail oSmtp.From = "SenderName" oSmtp.FromAddr = "<test@test.com>" oSmtp.AddRecipientEx "recipient@rec.com", 0 oSmtp.AddRecipientEx "cc@test.com", 1 oSmtp.AddRecipientEx "bcc@test.com", 2 oSmtp.Subject = "BCC test" oSmtp.BodyText = "This mail is to test BCC" oSmtp.SaveMail ("D:\test.txt") ________________________________________________________ produces the following mail file: ________________________________________________________ Message-ID: <99c9a10680a23afbea0ddf1d001e93a2@test.com> From: "SenderName" <test@test.com> To: <recipient@rec.com> Cc: <cc@test.com> Subject: BCC test Date: Thu, 12 Dec 2019 12:27:06 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable This mail is to test BCC ________________________________________________________ The BCC address is missing! What is wrong here? Any answer appreciated. Kind regards, FestePlatte
Rank: Administration
Groups: Administrators
Joined: 11/11/2010(UTC) Posts: 1,154
Thanks: 9 times Was thanked: 55 time(s) in 55 post(s)
Hi, Bcc header won't be added to message, but if you call SendMail method, the Bcc recipient will be sent to server. If you want a Bcc header, you can use oSmtp.AddHeader "Bcc", "bcc@test.com"
Rank: Newbie
Groups: Registered
Joined: 12/12/2019(UTC) Posts: 4
Hi ivan, thank you very much for this hint. That should work fine! Best regards, FestePlatte
Rank: Newbie
Groups: Registered
Joined: 12/12/2019(UTC) Posts: 4
Originally Posted by: ivan If you want a Bcc header, you can use oSmtp.AddHeader "Bcc", "bcc@test.com"
Hi Ivan,
if I do so, the BCC header is added as the first header entry, bevor any other header. Will that work?
Best regards,
Feste Platte
Rank: Administration
Groups: Administrators
Joined: 11/11/2010(UTC) Posts: 1,154
Thanks: 9 times Was thanked: 55 time(s) in 55 post(s)
Originally Posted by: FestePlatte Originally Posted by: ivan If you want a Bcc header, you can use oSmtp.AddHeader "Bcc", "bcc@test.com"
Hi Ivan,
if I do so, the BCC header is added as the first header entry, bevor any other header. Will that work?
Best regards,
Feste Platte
Yes it will work, but EASendMail has a known issue with Bcc header, if you used AddHeader with Bcc, there is only bcc header added, but if you call SendMail method, the recipient in bcc header won't be sent,
However if you used
AddRecipient "bcc", "bcc@domain", 2
AddHeader "Bcc", "bcc@domain" will not work.
In SMTP protocol, Bcc header should be removed, could you tell me why you need bcc header in message?
Rank: Newbie
Groups: Registered
Joined: 12/12/2019(UTC) Posts: 4
Hi Ivan,
Originally Posted by: ivan Originally Posted by: FestePlatte Originally Posted by: ivan Could you tell me why you need bcc header in message?
When reloading a mail which has been sent before I want to see if it has been sent to one or more BCC addresses. Ok, I'll use the "flag=2" method and shall store the BCC data separately in my mail database.
Thanks again for your great support!
Feste Platte
Forum Jump
EmailArchitect Support
Email Component Development
- EASendMail SMTP Component - .NET Version
- EASendMail SMTP Component - Windows Store Apps
- EASendMail SMTP ActiveX Object
- EAGetMail POP3 & IMAP4 Component - .NET Version
- EAGetMail POP3 & IMAP4 ActiveX Object
Exchange Server and IIS SMTP Plugin
- DomanKeys/DKIM for Exchange Server and IIS SMTP
- Disclaimer and S/MIME for Exchange Server and IIS
EmailArchitect Email Server
- EmailArchitect Email Server (General)
- EmailArchitect Email Server Development
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.