INetMailMessage.Bcc

Syntax

Bcc: INetMailAddressCollection;

Description

The Bcc property returns the collection of the email addresses, to which the blind copy of email message is sent.

Comments

These addresses are not available for the main recipient and the copies recipients (CC).

Example

To execute the example, add a link to the Net system assembly.

Sub UserProc;
Var
    Addr, From_, To_: INetMailAddress;
    CopyTo: INetMailAddressCollection;
    Message: INetMailMessage;
    Client: INetSmtpClient;
Begin
    From_ := New CurlMailAddress.Create("ivanov@server.ru");
    To_ := New CurlMailAddress.Create("petrov@mail.ru");
    Message := New CurlMailMessage.CreateWithFromAndTo(From_, To_);
    Message.Subject := "Test message";
    Message.Body := "Message copies";
    CopyTo := Message.BCC;
    Addr := New CurlMailAddress.CreateWithName("user1@mail.ru""User");
    CopyTo.Add(Addr);
    Addr := New CurlMailAddress.Create("user2@mail.ru");
    CopyTo.Add(Addr);
    Client := New CurlSmtpClient.CreateWithHost("example.server.ru");
    Client.Send(Message);
End Sub UserProc;

After executing the example the message is sent via the specified mail server. The message blind copy is sent to two addresses: user1@mail.ru and user2@mail.ru.

See also:

INetMailMessage | INetMailMessage.CC