PowerTCP Mail for .NET
BCC Property
See Also  Send comments on this topic.
Dart.PowerTCP.Mail Namespace > MessageStream Class : BCC Property




Gets a MailAddresses collection of blind carbon copy recipients.

Syntax

Visual Basic (Declaration) 
Public Property BCC As MailAddresses
Visual Basic (Usage)Copy Code
Dim instance As MessageStream
Dim value As MailAddresses
 
instance.BCC = value
 
value = instance.BCC
C# 
public MailAddresses BCC {get; set;}
Managed Extensions for C++ 
public: __property MailAddresses* get_BCC();
public: __property void set_BCC( 
   MailAddresses* value
);
C++/CLI 
public:
property MailAddresses^ BCC {
   MailAddresses^ get();
   void set (    MailAddresses^ value);
}

Property Value

MailAddresses collection.

Example

The following example demonstrates creating a basic MIME message with a single attachment.
Visual BasicCopy Code
' Be sure to import the namespace by putting "Imports Dart.PowerTCP.Mail"
' at the top of your class.

' Create a MessageStream object
Dim msg As New MessageStream()

' Add a normal recipient
msg.To.Add(New MailAddress("you@test.com"))

' Add a CC recipient
msg.CC.Add(New MailAddress("you2@test.com"))

' Add a BCC recipient
msg.BCC.Add(New MailAddress("you3@test.com"))

' Specify the sender
msg.From = New MailAddress("me@test.com")

' Specify the subject
msg.Subject = "Hello"

' Add some text to the message.
msg.Text = "Hi everyone. How are ya doing?"

' Add an attachment
msg.Attachments.Add("C:\files\graph.jpg")

' Specify the server
Smtp1.Server = "mail.test.com"

' Send the message
Smtp1.Send(msg)
C#Copy Code
// Be sure to import the namespace by putting "using Dart.PowerTCP.Mail;"
// at the top of your class.

// Create a MessageStream object
MessageStream msg = new MessageStream();

// Add a normal recipient
msg.To.Add(new MailAddress("you@test.com"));

// Add a CC recipient
msg.CC.Add(new MailAddress("you2@test.com"));

// Add a BCC recipient
msg.BCC.Add(new MailAddress("you3@test.com"));

// Specify the sender
msg.From = new MailAddress("me@test.com");

// Specify the subject
msg.Subject = "Hello";

// Add some text to the message.
msg.Text = "Hi everyone. How are ya doing?";

// Add an attachment
msg.Attachments.Add("C:\\files\\graph.jpg");

// Specify the server
smtp1.Server = "mail.test.com";

// Send the message
smtp1.Send(msg);

Remarks

Use the MessageStream.BCC property to add, remove, or otherwise manage any blind carbon copy recipients. Mail addresses in this collection will be listed after the SMTP "RCPT TO" command, but will not be included as part of the message header.

An alternative to using the MessageStream.BCC is to add any blind carbon copy recipients to Smtp.Recipients, which will have the exact same effect as adding them to MessageStream.BCC.

Requirements

Target Platforms: Microsoft .NET Framework 2.0

See Also

Documentation Version 3.2
© 2010 Dart Communications. All Rights Reserved.