M
Mike
I have a page with a textbox that a user can enter in mutliple email addresses such as:
(e-mail address removed);[email protected];[email protected];
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 = ConfigurationManager.AppSettings["smtpServer"];
message.From = new MailAddress(ConfigurationManager.AppSettings["FromAddress"]);
String[] temp = TextBox1.Text.ToString().Split(';');
foreach (string EmailAddress in temp)
{
message.To.Add(new MailAddress(EmailAddress ));
message.Subject = "a subject will go here;
message.Body = stuff will go here";
smtp.Send(message);
}
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
(e-mail address removed);[email protected];[email protected];
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 = ConfigurationManager.AppSettings["smtpServer"];
message.From = new MailAddress(ConfigurationManager.AppSettings["FromAddress"]);
String[] temp = TextBox1.Text.ToString().Split(';');
foreach (string EmailAddress in temp)
{
message.To.Add(new MailAddress(EmailAddress ));
message.Subject = "a subject will go here;
message.Body = stuff will go here";
smtp.Send(message);
}
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