SmtpMail.SmtpServer = settings.SmtpServer;
m.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1" ); //basic authentication
m.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", settings.SmtpServerUserName ); //set your username here
m.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", settings.SmtpServerPassword ); //set your password hereSmtpMail.Send(m);
小弟用了个CMail作为邮件服务器,用Outlook测试可以.
结果写了个.net发送邮件的(上面的)。出现“未能访问“CDO.Message”对象。”问题,改成126的邮箱又可以。
请问这是什么问题。该怎么解决?谢谢!十万火急。。