我利用system.net.mail的smtpclient发信时,邮件服务器返回 505 Authentication required的信息。
但是我使用System.web.mail的smtpmail发信时却发信成功。
System.web.mail的MailMessage里追加了如下的验证信息。
mailObj.Fields.Add(\"http://schemas.microsoft.com/cdo/configuration/smtpauthenticate\", \"1\"); //设置需要验证
mailObj.Fields.Add(\"http://schemas.microsoft.com/cdo/configuration/sendusername\", username); //用户名
mailObj.Fields.Add(\"http://schemas.microsoft.com/cdo/configuration/sendpassword\", password);
system.net.mail的smtpclient不能通过需要验证的邮件服务器发信吗?