最好不利用远程smtp服务器的方法。
需要能批量快速发送邮件。

解决方案 »

  1.   

    那你在自己的机器上架一个smtp服务器把。
      

  2.   

    例如:Foxmail里的特快专递是怎么发送的?
      

  3.   

    http://www.microsoft.com/china/community/Column/27.mspx里面有几种方案
      

  4.   

    先注册一个jMail组件,免费的,你到网上搜一下
    public class jSendMail
    {
       private string _creditUser;
       private string _creditPassword;
       private string _mailServer;   /// <summary>
       /// 邮件服务器验证用户名
       /// </summary>
       public string CreditUser
       {
          get{return _creditUser;}
          set{_creditUser = value;}
       }
       /// <summary>
       /// 邮件服务器验证用户密码
       /// </summary>
       public string CreditPassword
       {
          get{return _creditPassword;}
          set{_creditPassword = value;}
       }
       /// <summary>
       /// 邮件服务器地址
       /// </summary>
       public string SMTPServer
       {
          get{return _mailServer;}
          set{_mailServer = value;}
       }
       public jSendMail()
       {
          this.SMTPServer = "mxvip4.hichina.com";
       }
       /// <summary>
       /// 发邮件
       /// </summary>
       /// <param name="strFromUser">发件人地址</param>
       /// <param name="strToUser">收件人地址</param>
       /// <param name="strTitle">邮件标题</param>
       /// <param name="strContent">邮件正文</param>
       /// <param name="strFolderPath">附件文件夹的绝对路径</param>
       /// <returns></returns>
       public string SendMail(string strFromUser,string strToUser,string strSubject,string strContent,string strFolderPath)
       {
          jmail.MessageClass mail = new jmail.MessageClass();
          mail.From = strFromUser;
          mail.AddRecipient(strToUser,"","");
          mail.Subject = strSubject;
          mail.Body = strContent;
          mail.AddAttachment(strFolderPath,true,".doc");
          mail.MailServerUserName = this.CreditUser;
          mail.MailServerPassWord = this.CreditPassword;
          try
          {
             bool f = mail.Send(this.SMTPServer,false);
             return "ok";
          }
          catch(Exception ex)
          {
             return ex.Message;
          }
       }
    }
      

  5.   

    我调用System.Web.Mail.SmtpMail.Send方法,设置SmtpServer就出Exception,不设置SmtpServer(我本地的Smtp Serivce已经启动),程序可以运行,但目标邮箱收不到邮件。
         采用CDONTS,程序可以正常运行,但目标邮箱也收不到邮件。
         采用自己写的mailSender类,远程SMtp服务器短时间内只允许6次登陆。
         
      

  6.   

    public bool Send(string to, string from, string subject, string message) { try { MailMessage em = new MailMessage(); em.To = to; em.From = from; em.Subject = subject; em.Body = message; 
    if(this.UserName != null && this.Password != null) { em.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1");   //basic authentication em.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", this.UserName); //set your username here em.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", this.Password); //set your password here }  //SmtpMail.SmtpServer = this.SmtpServer;
    SmtpMail.SmtpServer = "smtp.126.com"; SmtpMail.Send(em); return true; } catch { return false; } }