使用System.Web.Mail 组件通过SMTP认证发送邮件
需要加入认证信息
Message.Fields.Add("
http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1" );
//basic authentication
Message.Fields.Add("
http://schemas.microsoft.com/cdo/configuration/sendusername", userName);
// 设置smtp服务器登录账号
Message.Fields.Add("
http://schemas.microsoft.com/cdo/configuration/sendpassword", userPassword );
// 设置smtp服务器登录密码
同时SMTP与POP3用户名需一致!!
转载于:https://www.cnblogs.com/shrpcn/archive/2005/01/17/92895.html