在邮件标题中发现无效字符:“;”。
String s="[email protected],[email protected]";
MailMessage oMailMessage = new MailMessage();
oMailMessage.To.Add(new MailAddress(s));
oMailMessage.From = new MailAddress(oSmtpSection.From);
我在
oMailMessage.To.Add(new MailAddress(s));
中遇到错误 最佳答案
这是代码:
MailMessage oMailMessage = new MailMessage();
oMailMessage.Body = ....;
oMailMessage.To.Add("[email protected]");
oMailMessage.To.Add("[email protected]");
SmtpClient smtp = new SmtpClient();
smtp.Send(oMailMessage);