Adding Bcc to Email sending using .NET SmtpClient?

45,210

Solution 1

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);

Solution 2

You're looking for the aptly-named Bcc property:

message.Bcc.Add("[email protected]");

Solution 3

Here i will explain how to send email with cc and bcc using asp.net c# application.

 MailMessage mailMessage = new MailMessage(smtpUser, toAddress);
 if (!string.IsNullOrEmpty(cc))
 {
    mailMessage.CC.Add(cc);
 }
 if (!string.IsNullOrEmpty(bcc))
 {
    mailMessage.Bcc.Add(bcc);
 }

For full example http://www.stepover-f10.com/2014/01/how-send-email-with-cc-and-bcc-with-authentication-using-aspnet-csharp-example-source-code.aspx click this link.

Share:
45,210
Dushan Perera
Author by

Dushan Perera

❤️ building super 🚅 fast 🏎️ web experience 🚀 Azure functions <⚡> is my recent area of interest. Former ASP.NET MVP Please feel free to suggest improvements to my posts

Updated on July 05, 2022

Comments

  • Dushan Perera
    Dushan Perera almost 2 years

    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?