Reputation: 96
I am sending an email to the users using smtp client and MailMessage class.
I have been adding the addresses of multiple receivers in the to property of the object of MailMessage class. The problem is that the receiver can see the email addresses of other receipents. Is there any way to hide the email addresses of other receipents.
I mean setting some property or something like that.
Otherwise I will be left with only option to send individual email to the users.
Any help please
Upvotes: 2
Views: 1549
Reputation: 13474
Place all the recipients on the BCC of the email. This prevents them from seeing the email of other BCC recipients To add a BCC recipient to an e-mail message, create a MailAddress for the recipient's address, and then add that object to the collection returned by the Bcc property. When recipients view an e-mail message, the Bcc addresses are usually not displayed.
MailAddress bcc = new MailAddress("[email protected]");
Upvotes: 1
Reputation: 51624
You can add multiple receipients to the MailMessage.Bcc
collection. If you send the message to yourself and use BCC for every receipient, then they can only see your address. (See also BCC at Wikipedia)
yourMessage.Bcc.Add(new MailAddress("[email protected]"));
yourMessage.Bcc.Add(new MailAddress("[email protected]"));
Upvotes: 5