Allows you to easily set the EmailMessage.Bcc property of an email without having to use the EmailMessge.AddBcc() method.
For Example: EmailMessge.Bcc = "me@myCompany.com" You can also use commas (,) or semi-colons if you want to use multiple email addresses with the EmailMessage.Bcc property. For example: EmailMesage.Bcc = "me@myCompany.com;you@yourCompany.com;him@hisCompany.com"
[C#]
EmailMessage msg = new EmailMessage( "mail.MyCompany.com" );
msg.FromAddress = "me@MyCompany.com";
msg.To = "you@YourCompany.com";
msg.Bcc = "myBoss@MyCompany.com";
msg.Subject = "Daily Newsletter";
msg.Body = "Here is our daily newsletter.....";
if ( msg.Send() )
{
Console.WriteLine( "Message Sent!");
}
else
{
Console.WriteLine( msg.LastException().Message );
}
[Visual Basic]
Dim msg As New EmailMessage("mail.MyCompany.com")
msg.FromAddress = "me@MyCompany.com"
msg.To = "you@YourCompany.com"
msg.Bcc = "myBoss@MyCompany.com"
msg.Subject = "Daily Newsletter"
msg.Body = "Here is our daily newsletter....."
If (msg.Send()) Then
Console.WriteLine("Message Sent!")
Else
Console.WriteLine(msg.LastException().Message)
End If