标签:
client.UseDefaultCredentials = true;
要放在
client.Credentials = new NetworkCredential("用户名", "密码");
的前面
var client = new SmtpClient()
{
UseDefaultCredentials = true,
Credentials = cre,
Host = CONSTANT.Host,
Port = CONSTANT.Port,
EnableSsl = false,
DeliveryMethod = SmtpDeliveryMethod.Network
};
标签:
原文地址:http://www.cnblogs.com/techfans/p/5009762.html