在邮件标题中找到了无效字符:';'。
String s="arun@gamil.com,mohan@gmail.com";
MailMessage oMailMessage = new MailMessage();
oMailMessage.To.Add(new MailAddress(s));
oMailMessage.From = new MailAddress(oSmtpSection.From);
我在oMailMessage.To.Add(new MailAddress(s));
答案 0 :(得分:0)
以下是代码:
MailMessage oMailMessage = new MailMessage();
oMailMessage.Body = ....;
oMailMessage.To.Add("arun@gamil.com");
oMailMessage.To.Add("mohan@gmail.com");
SmtpClient smtp = new SmtpClient();
smtp.Send(oMailMessage);