Timestamp:  2006-12-25  13:05:54  
Message:  HandlingInstanceID:  5f48a876-9447-4a4d-893b-4d744fd00059  
An  exception  of  type  'System.Exception'  occurred  and  was  caught.  
----------------------------------------------------------------  
12/25/2006  13:05:54  
Type  :  System.Exception,  mscorlib,  Version=1.0.5000.0,  Culture=neutral,  PublicKeyToken=b77a5c561934e089  
Message  :  Email  发送error:[email protected]  
Source  :    
Help  link  :    
TargetSite  :    
Stack  Trace  :  The  stack  trace  is  unavailable.  
Additional  Info:  
 
MachineName  :  Pro  
TimeStamp  :  2006-12-25  5:05:54  
FullName  :  Microsoft.Practices.EnterpriseLibrary.ExceptionHandling,  Version=1.0.0.0,  Culture=neutral,  PublicKeyToken=null  
AppDomainName  :  /LM/W3SVC/429177280/Root-5-128114678452031250  
ThreadIdentity  :  19999991402  
WindowsIdentity  :  NT  AUTHORITY\NETWORK  SERVICE  
           Inner  Exception  
           ---------------  
           Type  :  System.Runtime.InteropServices.COMException,  mscorlib,  Version=1.0.5000.0,  Culture=neutral,  PublicKeyToken=b77a5c561934e089  
           Message  :  与服务器的传输连接失败。  
 
           Source  :  CDO.Message.1  
           Help  link  :    
           ErrorCode  :  -2147220973  
           TargetSite  :  Void  Send()  
           Stack  Trace  :        at  CDO.MessageClass.Send()  
               ....  
发送时,老出错误,错误信息以上.  

解决方案 »

  1.   

    我们用的是自已的smtp服务器
    帮我看看问题
    不会用jmail的
      

  2.   

    public static void SendEMail(string strSmtpServer, string UserName, string Password, string strFrom, string strto, string strSubject, string strBody)
            {
                System.Net.Mail.SmtpClient client = new System.Net.Mail.SmtpClient(strSmtpServer);
                client.UseDefaultCredentials = false;
                client.Credentials = new System.Net.NetworkCredential(UserName, Password);
                client.DeliveryMethod = System.Net.Mail.SmtpDeliveryMethod.Network;
                
                System.Net.Mail.MailMessage message = new System.Net.Mail.MailMessage(strFrom, strto, strSubject, strBody);
                message.BodyEncoding = System.Text.Encoding.GetEncoding("gb2312");
                message.SubjectEncoding = System.Text.Encoding.GetEncoding("gb2312");
                message.IsBodyHtml = false;            client.Send(message);
            }