在本机环境。通过程序运行起来可以正常收到邮件,生成DLL后在Quartz跑起来则异常:
2011-03-29 12:18:20,985 [ServerScheduler_Worker-4] INFO  MailHelper [(null)] - System.Net.Mail.SmtpException: 发送邮件失败。 ---> System.Net.WebException: 无法连接到远程服务器 ---> System.Net.Sockets.SocketException: 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。 xxx.xxx.xx.xx:25
   在 System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
   在 System.Net.Sockets.Socket.InternalConnect(EndPoint remoteEP)
   在 System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception)
   --- 内部异常堆栈跟踪的结尾 ---
   在 System.Net.ServicePoint.GetConnection(PooledStream PooledStream, Object owner, Boolean async, IPAddress& address, Socket& abortSocket, Socket& abortSocket6, Int32 timeout)
   在 System.Net.PooledStream.Activate(Object owningObject, Boolean async, Int32 timeout, GeneralAsyncDelegate asyncCallback)
   在 System.Net.PooledStream.Activate(Object owningObject, GeneralAsyncDelegate asyncCallback)
   在 System.Net.ConnectionPool.GetConnection(Object owningObject, GeneralAsyncDelegate asyncCallback, Int32 creationTimeout)
   在 System.Net.Mail.SmtpConnection.GetConnection(String host, Int32 port)
   在 System.Net.Mail.SmtpTransport.GetConnection(String host, Int32 port)
   在 System.Net.Mail.SmtpClient.GetConnection()
   在 System.Net.Mail.SmtpClient.Send(MailMessage message)
   --- 内部异常堆栈跟踪的结尾 ---
   在 System.Net.Mail.SmtpClient.Send(MailMessage message)
配置文件:<system.net>
    <mailSettings>
      <smtp deliveryMethod="Network" from="[email protected]">
        <network host="smtp.myweb.cn" port="25" userName="[email protected]" password="aaabbbccc"/>
      </smtp>
    </mailSettings>
  </system.net>
不知道为什么,求高手帮助!