Adding Bcc to Email sending using .NET SmtpClient?

Shyju picture Shyju · Mar 19, 2010 · Viewed 42.7k times · Source

When sending email using the SMTPClient class in ASP.NET C#, how can I add bcc to the email? How can I add bcc to a MailMessage instance?

Answer

Kelsey picture Kelsey · Mar 19, 2010
MailAddress addressTo = new MailAddress("[email protected]");
MailAddress addressFrom = new MailAddress("[email protected]");
MailAddress addressBCC = new MailAddress("[email protected]");

MailMessage MyMessage = new MailMessage(addressFrom, addressTo );
MyMessage.Bcc.Add(addressBCC);