----------------------------------------------------------- New Message on BDOTNET
----------------------------------------------------------- From: AnupPS Message 2 in Discussion Hi, We too get this kind of problem sometimes. The SMTP server could be slow even with the microsoft servers. The method we use is not to restart the machine (not a good solution for a live environment). Instead we retry sending the mail for a fixed N number of times in a seperate thread until the exception occurs. We do keep a seperate thread for this with atleast 30 sec time span between 2 retries. Never had a retry over 3 times. Hope this helps. Regards, Anup Shinde. On 9/2/05, satinder <[EMAIL PROTECTED]> wrote: New Message on BDOTNET Urgent... If mention SmtpMail.SmtpServer="XYZServer" showing ?EXCEPTION" Reply Reply to Sender Recommend Message 1 in Discussion From: satinder Hi Try restarting the IIS server. We often get this error - but when we restart IIS it works smooth. Check if samething works with your case as well. Rgds Satinder -----Original Message----- From: KolkataNet [mailto: [EMAIL PROTECTED] Sent: Thursday, September 01, 2005 8:44 PM To: [EMAIL PROTECTED] ; [email protected]; [email protected]; [email protected]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [email protected]; [email protected] Subject: Urgent... If mention SmtpMail.SmtpServer="XYZServer" showing ?EXCEPTION" New Message on BDOTNET Urgent... If mention SmtpMail.SmtpServer="XYZServer" showing "EXCEPTION" Reply Reply to Sender Recommend Message 1 in Discussion From: KolkataNet Hi, In a website if I mentioned the SmtpMail.SmtpServer = "ServerIP" it's showing the same error: "EXCEPTION Could not access 'CDO.Message' object." If I remove, then this is working fine. The code is as follows. Please help me resolve the problem. Public Function SendMail(ByVal sFrom As String, ByVal sTo As String, ByVal sSubject As String, ByVal sBody As String, Optional ByVal sCc As String = "", Optional ByVal sFiles As String = "", Optional ByVal sSmtpServer As String = "") Try Dim insMail As New MailMessage With insMail .From = Trim(sFrom) .To = Trim(sTo) .Subject = Trim(sSubject) .Body = Trim(sBody) .BodyFormat = MailFormat.Html End With '-- This code is to set the SMTP Server If Trim(sSmtpServer) <> "" Then SmtpMail.SmtpServer = Trim(sSmtpServer) ElseIf ConfigurationSettings.AppSettings ("SMTP_Server") <> "" Then SmtpMail.SmtpServer = ConfigurationSettings.AppSettings("SMTP_Server") End If SmtpMail.Send(insMail) Catch err As Exception HttpContext.Current.Response.Write("EXCEPTION " + err.Message + "<br>") End Try End Function Thanks, Abu View other groups in this category. View other groups in this category. Also on MSN: Start Chatting | Listen to Music | House & Home | Try Online Dating | Daily Horoscopes To stop getting this e-mail, or change how often it arrives, go to your E-mail Settings. Need help? If you've forgotten your password, please go to Passport Member Services. For other questions or feedback, go to our Contact Us page. If you do not want to receive future e-mail from this MSN group, or if you received this message by mistake, please click the "Remove" link below. On the pre-addressed e-mail message that opens, simply click "Send". Your e-mail address will be deleted from this group's mailing list. Remove my e-mail address from BDOTNET. ----------------------------------------------------------- To stop getting this e-mail, or change how often it arrives, go to your E-mail Settings. http://groups.msn.com/BDOTNET/_emailsettings.msnw Need help? If you've forgotten your password, please go to Passport Member Services. http://groups.msn.com/_passportredir.msnw?ppmprop=help For other questions or feedback, go to our Contact Us page. http://groups.msn.com/contact If you do not want to receive future e-mail from this MSN group, or if you received this message by mistake, please click the "Remove" link below. On the pre-addressed e-mail message that opens, simply click "Send". Your e-mail address will be deleted from this group's mailing list. mailto:[EMAIL PROTECTED]
