使用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用户名需一致!!
posted on 2005-01-17 09:47  Sharper代码人生  阅读(1251)  评论(2)    收藏  举报