I am not able to get an e-mail sent to multiple recipients. I am using C# in VS 2003.
Here is the code:
MailMessage mail = new MailMessage();
mail.To = "address1@somew here.com;addres s2@somewhere.co m";
mail.Cc="addres s3@somewhere.co m";
mail.From = "My Program";
mail.Subject = "Alert";
mail.Priority = MailPriority.Hi gh;
mail.BodyFormat = MailFormat.Text ;
mail.Body = sMessage;
SmtpMail.SmtpSe rver = "mymailserver.s omewhere.com";
SmtpMail.Send(m ail);
When using this the message gets sent to address1 and address3 but not address2. I have also tried using a comma in place of the semicolon with no luck. I am at a loss as I get no error message and everything I have looked up says that this is correct and should work. Any help would be apprectiated.
Thanks
Nate
Here is the code:
MailMessage mail = new MailMessage();
mail.To = "address1@somew here.com;addres s2@somewhere.co m";
mail.Cc="addres s3@somewhere.co m";
mail.From = "My Program";
mail.Subject = "Alert";
mail.Priority = MailPriority.Hi gh;
mail.BodyFormat = MailFormat.Text ;
mail.Body = sMessage;
SmtpMail.SmtpSe rver = "mymailserver.s omewhere.com";
SmtpMail.Send(m ail);
When using this the message gets sent to address1 and address3 but not address2. I have also tried using a comma in place of the semicolon with no luck. I am at a loss as I get no error message and everything I have looked up says that this is correct and should work. Any help would be apprectiated.
Thanks
Nate
Comment