smtp发邮件时MailServerUserName和MailServerPassWord在后台写什么地方

解决方案 »

  1.   

    seehttp://www.eggheadcafe.com/PrintSearchContent.asp?LINKID=622
      

  2.   

    http://dev.csdn.net/article/67/67456.shtm
    顺便问一下思归大哥,写下边这几个地址的意义是什么?
    http://schemas.microsoft.com/cdo/configuration/smtpauthenticate
    http://schemas.microsoft.com/cdo/configuration/sendusername
    http://schemas.microsoft.com/cdo/configuration/sendpassword
      

  3.   

    saucer(思归)兄给的地址不错。
      

  4.   

    参考
    http://msdn.microsoft.com/library/en-us/e2k3/e2k3/_cdo_schema_configuration.asp?frame=truehttp://schemas.microsoft.com/cdo/configuration/smtpauthenticate属性用来指定认证方式, 对应的值,
    0 -- 无认证
    1--用基本认证机制
    2--用NTLM认证机制http://schemas.microsoft.com/cdo/configuration/sendusername属性用来指定认证所用登陆名http://schemas.microsoft.com/cdo/configuration/sendpassword属性用来指定认证所用密码
      

  5.   

    麻烦saucer(思归)大哥再帮我看看,好象还是不能发送,这是怎么回事?MailMessage message = new MailMessage();
    message.BodyFormat = MailFormat.Text;
    message.From = "[email protected]";
    message.To = GM_EMAIL.Text.Trim();
    message.Subject = "测试邮件";
    message.Body = txtCONTENT;
    SmtpMail.SmtpServer = "SMTP.163.COM";
    message.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1"); 
    message.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", "xxx"); 
    message.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", "xxx"); 
    SmtpMail.Send(message);