This documentation is archived and is not being maintained.

MailMessage.Cc Property

Gets or sets a semicolon-delimited list of e-mail addresses that receive a carbon copy (CC) of the e-mail message.

[Visual Basic]
Public Property Cc As String
[C#]
public string Cc {get; set;}
[C++]
public: __property String* get_Cc();
public: __property void set_Cc(String*);
[JScript]
public function get Cc() : String;
public function set Cc(String);

Property Value

A semicolon-delimited list of e-mail addresses that receive a carbon copy (CC) of the e-mail message.

Remarks

Recipients in the semicolon-delimited list can be either email addresses or address book display names.

Example

[Visual Basic] 
Dim MyMessage As MailMessage = New MailMessage()
MyMessage.Cc = "fred@contoso.com"

[C#] 
MailMessage MyMessage = new MailMessage();
MyMessage.Cc = "fred@contoso.com";

[C++] 
MailMessage* MyMessage = new MailMessage();
MyMessage->Cc = S"fred@contoso.com";

[JScript] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button Language Filter in the upper-left corner of the page.

Requirements

Platforms: Windows 2000, Windows XP Professional, Windows Server 2003 family

See Also

MailMessage Class | MailMessage Members | System.Web.Mail Namespace

Show: