我知道这已经被问过很多次了,但是我所看到的例子对于我的口味来说太复杂了。下面的代码效果很好,但不能满足向多个收件人发送电子邮件的需求。 需要进行哪些修改才能启用该功能? 谢谢
public static void Send_Email(string mailFrom, string mailTo, string mailSubject, string mailBody)
{
MailMessage mail = new MailMessage(mailFrom, mailTo);
SmtpClient client = new SmtpClient();
client.Port = 25;
client.DeliveryMethod = SmtpDeliveryMethod.Network;
client.UseDefaultCredentials = false;
client.Host = "myexchange";
mail.Subject = mailSubject;
mail.Body = mailBody;
client.Send(mail);
}