Gets or sets the list of carbon copy (CC) recipients of the message.
Namespace: MailBee.MimeAssembly: MailBee.NET (in MailBee.NET.dll) Version: 12.5.0 build 687 for .NET 4.5
Syntax public EmailAddressCollection Cc { get; set; }
Public Property Cc As EmailAddressCollection
Get
Set
Property Value
Type:
EmailAddressCollection
An
EmailAddressCollection object containing a collection of e-mail addresses
of carbon copy recipients of the message. The default value is an empty collection.
Exceptions Remarks
To specify
Cc as a string, set
msg.Cc.AsString value
(assuming
msg is
MailMessage instance).
If it's necessary to add some hidden recipients that should not be displayed in the mail message,
the developer should use the Bcc property.
Examples This sample loads the message from .EML file and displays the e-mail addresses of CC recipients.
using System;
using MailBee;
using MailBee.Mime;
class Sample
{
static void Main(string[] args)
{
MailMessage msg = new MailMessage();
msg.LoadMessage(@"C:\Docs\TestMail.eml");
Console.WriteLine("The list of CC recipients of the message:");
foreach (EmailAddress adr in msg.Cc)
{
Console.WriteLine(adr.Email);
}
}
}
Imports System
Imports MailBee
Imports MailBee.Mime
Module Sample
Sub Main(ByVal args As String())
Dim msg As New MailMessage
msg.LoadMessage("C:\Docs\TestMail.eml")
Console.WriteLine("The list of CC recipients of the message:")
For Each adr As EmailAddress In msg.Cc
Console.WriteLine(adr.Email)
Next
End Sub
End Module
See Also