Hi,
I'm trying to send an e-mail using smtp. I only want to create one mail object and I want to send to multiple Users. I do not want the user's to be able to see who else is receiving th mail. Currently I'm only sending to one person at the moment. Here is what I have so far. btw, I'm using 2.0
protected
void SendMail(string To, string Subject, string Body){
MailMessage message = new MailMessage();message.From =
new MailAddress(System.Configuration.ConfigurationSettings.AppSettings["MailSender"],System.Configuration.
ConfigurationSettings.AppSettings["MailSenderName"]);message.To.Add(
new MailAddress(To));message.Subject = Subject;
message.Body = Body;
SmtpClient client = new SmtpClient();client.Host = System.Configuration.
ConfigurationSettings.AppSettings["MailSMTPServer"];message.Priority =
MailPriority.High;client.Send(message);
}

How to send E-mail to multiple users but only 1 email visible to reciever
SollenbC
Kamol Murodov
Only the message sent to the To or CC will appear in the message and thus BCC won't suite your needs. What you need to do is construct your mail message object and set the To field to the first address you wish to send to:
message.To.Add(new MailAddress(To));
. Send that mail. Then clear the To field and set it to the next person you wish to get the email and send that message. Repeat this until you have sent to everyone.
message.To.Clear( ) - should clear the To field. Use this between sends.
Peter Han
Cheers, I think this is the best solution using the one mail object.
NickMalloy
Can they see their own address this way I want to give the impression they are the only person getting the e-mail so I want them to see their own and no one elses...
bryananderson11
message.Bcc.Add(new MailAddress("joe@mamma.com"));
message.Bcc.Add(new MailAddress("jeff@faddah.com"));
message.Bcc.Add(new MailAddress("jay@liddle-ol-grannie.com"));
GnomeKing
hmm. . . you sure
If I send an email via outlook with only BCC's sent, the recipient sees his address in the To field.
liyuefu
hi
Try sending using Message.cc(example1@ex.com);
i think this should work cos if BCC is given then the user will not be able to see their mailID.
regards
Aditya
parheric
Like I said. No e-mail address appears.