Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
FestePlatte  
#1 Posted : Thursday, December 12, 2019 3:55:45 AM(UTC)
FestePlatte

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
ivan  
#2 Posted : Friday, December 13, 2019 9:09:23 AM(UTC)
ivan

Rank: Administration

Groups: Administrators
Joined: 11/11/2010(UTC)
Posts: 1,148

Thanks: 9 times
Was thanked: 54 time(s) in 54 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"
FestePlatte  
#3 Posted : Friday, December 13, 2019 9:45:48 AM(UTC)
FestePlatte

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
FestePlatte  
#4 Posted : Saturday, January 18, 2020 7:32:56 AM(UTC)
FestePlatte

Rank: Newbie

Groups: Registered
Joined: 12/12/2019(UTC)
Posts: 4

Originally Posted by: ivan Go to Quoted Post

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
ivan  
#5 Posted : Saturday, January 18, 2020 5:26:18 PM(UTC)
ivan

Rank: Administration

Groups: Administrators
Joined: 11/11/2010(UTC)
Posts: 1,148

Thanks: 9 times
Was thanked: 54 time(s) in 54 post(s)
Originally Posted by: FestePlatte Go to Quoted Post
Originally Posted by: ivan Go to Quoted Post

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?



FestePlatte  
#6 Posted : Sunday, January 19, 2020 2:28:48 AM(UTC)
FestePlatte

Rank: Newbie

Groups: Registered
Joined: 12/12/2019(UTC)
Posts: 4

Hi Ivan,

Originally Posted by: ivan Go to Quoted Post
Originally Posted by: FestePlatte Go to Quoted Post
Originally Posted by: ivan Go to Quoted Post


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

Users browsing this topic
Forum Jump  
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.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.079 seconds.

EXPLORE TUTORIALS

© All Rights Reserved, AIFEI Software Limited & AdminSystem Software Limited.