服务器响应为:authentication is required,smtp9,DcCowABHK4UYE11W2k6fAQ--.52196S2 1448940312
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
};
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)