I have a page with a textbox that a user can enter in mutliple email addresses such as:
us***@yahoo.com ;us***@yahoo.co m;us***@gmail.c om;
and so on, I then have a foreach loop to get all of the emaill addresses and send emails out.
the problem is that all of the email addresses the email is being sent to is showing in the [TO] section so everyone knows who's getting the email.
How can I have 1 email address showing in the [TO] section so no one knows who else is getting the email?
this is what I have;
SmtpClient smtp = new SmtpClient();
MailMessage message = new MailMessage();
smtp.Host = ConfigurationMa nager.AppSettin gs["smtpServer "];
message.From = new MailAddress(Con figurationManag er.AppSettings["FromAddres s"]);
String[] temp = TextBox1.Text.T oString().Split (';');
foreach (string EmailAddress in temp)
{
message.To.Add( new MailAddress(Ema ilAddress ));
message.Subject = "a subject will go here;
message.Body = stuff will go here";
smtp.Send(messa ge);
}
I don't want the people that get this email see who else gets it. And a group is not possible due to the address can change