public void Send(string strSmtpServer, string strFrom, string strPassword, string strTo, string strSubject, string strBody)
        {
            Configuration conf = new ConfigurationClass();
            conf.Fields[CdoConfiguration.cdoSendUsingMethod].Value = CdoSendUsing.cdoSendUsingPort;
            //conf.Fields[CdoConfiguration.cdoSendEmailAddress].Value = strFrom;
            conf.Fields[CdoConfiguration.cdoSMTPServer].Value = strSmtpServer;
            conf.Fields[CdoConfiguration.cdoSendUserName].Value = strFrom;
            conf.Fields[CdoConfiguration.cdoSendPassword].Value = strPassword;
            //发送者名称,这一项要注意检查,不可以乱写   
            conf.Fields[CdoConfiguration.cdoSMTPServerPort].Value = 25;
            conf.Fields[CdoConfiguration.cdoSMTPAuthenticate].Value
            = CdoProtocolsAuthentication.cdoBasic;
            conf.Fields.Update();            MessageClass mail = new MessageClass();
            mail.Configuration = conf;
            mail.To = strTo;
            mail.From = strFrom;
            mail.Subject = "OK";
            mail.TextBody = "OK";
            //mail.CC = txtCC.Text;
            //mail.BCC = txtBCC.Text;
            //string strPath = Cache["Path"].ToString();
            //mail.AddAttachment(strPath, "wacle", "storm");//添加附件功能   
            try
            {
                mail.Send();
                MessageBox.Show("发送成功");
            }
            catch (Exception err)
            {
                throw (new Exception(err.Message));
            }          }
我用上面的函数发送邮件,奇怪的是,我用A邮箱发送邮件到B邮箱(新开的邮箱),发送成功。但从B邮箱发送到A邮箱就提示:“邮件无法发送到 SMTP 服务器。传输错误代码为 0x80040217。服务器响应为 not available”不知道为什么?不知道大家是否遇到过这样的问题。