用IIS自带的发邮件的功能,为了防止其他收件人的信箱拒绝接收就做了发件验证
用了如下的方法,但我在页面中有
1. 发件用户email地址
2. 发件用户用户名
3. 发件用户信箱密码
比如:发件人信箱是 [email protected] 我认为发件人的用户名是ppee,但老板说163是经过处理的,用户名就是[email protected]
 
但老板说,发件用户名就是email地址,死活不让用户填写发件用户名,请各位说说  老板的说法对不对,由于开发的程序,还没有部署,开发环境又不能上网,请各位给个说法,谢谢
mail.fields.add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1"); //basic authentication 
mail.fields.add("http://schemas.microsoft.com/cdo/configuration/sendusername", "brookes"); //set your username here 
mail.fields.add("http://schemas.microsoft.com/cdo/configuration/sendpassword", "walkor"); //set your password here smtpmail.send(mail); 

解决方案 »

  1.   

    username就是 ppee。不能带@163.com,你老板说什么,就是什么了?那你用实际操作给他试试,结果不是最能说明问题吗?
      

  2.   

    mm.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1");
    mm.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", "[email protected]");
    mm.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", "xxxxxxxxx"); 
    我的webchat.com.cn里面发邮件就是这样
    你老板是对的!