Cdo Error Handling
Contents |
to catch problem emails? If this is your first visit, be sure to check out the FAQ by
Cdo Message Return Codes
clicking the link above. You may have to register before you cdo.message error handling can post: click the register link above to proceed. To start viewing messages, select the forum cdo.message error codes that you want to visit from the selection below. Results 1 to 3 of 3 Thread: Sending Emails with CDO, how to catch problem emails? Tweet Thread Tools
Cdo.message.1 The Transport Failed To Connect To The Server
Show Printable Version Subscribe to this Thread… Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode Apr 29th, 2008,04:47 AM #1 VB rookie View Profile View Forum Posts Thread Starter Lively Member Join Date Nov 2006 Posts 105 Sending Emails with CDO, how to catch problem emails? I have an automatic email function in my app, and the code looks like: Code: formAllEmails.MousePointer = vbHourglass 'setup for email Set objemail = CreateObject("CDO.Message") objemail.From = emailDisplayName & "<" & emailAddressDB & ">" objemail.To = p_email '*************** 'needs to chang to check type, then send appropriate message '*************** objemail.Subject = "An update on from " & emailDisplayName objemail.TextBody = message objemail.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 'Name or IP of Remote SMTP Server objemail.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = emailServer 'Type of authentication, NONE, Basic (Base64 encoded), NTLM objemail.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = cdoBasic 'Your UserID on the SMTP server objemail.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/sendusername") = emailAddressDB 'Your password on the SMTP server objemail.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/sendpassword") = emailPassword 'Server port (typically 25) objemail.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = emailPort 'Use SSL for the connection (False or True) If emailSSL = "1" Then objemail.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = True Else objemail.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = False End If 'Connection Timeout in seconds (the maximum time CDO will try to establish a connection to the SMTP server) objemail.Configuration.Fields.Item _ ("http://
van GoogleInloggenVerborgen veldenZoeken naar groepen of berichten
Unanswered Topics Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > ASP Pro Code Clinic CDO Email Errors not trapped http://p2p.wrox.com/asp-pro-code-clinic/9830-cdo-email-errors-not-trapped-error.html by On Error User Name Remember Me? Password Reminder Password Register Register | FAQ | Members List | Calendar | Today's Posts | Search ASP Pro Code Clinic As of Oct 5, http://www.cdolive.com/cdo5.htm 2005, this forum is now locked. No posts have been deleted. Please use "Classic ASP Professional" at: http://p2p.wrox.com/forum.asp?FORUM_ID=56 for discussions similar to the old ASP Pro Code Clinic or one of error handling the other many remaining ASP and ASP.NET forums here. Search Forums Show Threads Show Posts Advanced Search Find All Thanked Posts Go to Page... Welcome to the p2p.wrox.com Forums. You are currently viewing the ASP Pro Code Clinic section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book cdo error handling authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free . Thread Tools Display Modes #1 (permalink) February 26th, 2004, 06:04 PM ebycer Registered User Join Date: Feb 2004 Location: , , . Posts: 3 Thanks: 0 Thanked 0 Times in 0 Posts CDO Email Errors not trapped by On Error Hi, I've got a problem where my apps email service is sporadic. Sometimes works like a charm, other times fails miserably. What's supposed to happen is the following: When an e-mail is successfully sent -- exit successfully and do nothing further. When an error occurs on the email Send command 1) Log the error # and description, body, subject, and distribution in a table 2) Generate a message for the user explaining that the e-mail has NOT been sent, but everything else is OK 3) Give them a link to redirect them so they continue as if no err
Tricks - Common Tasks Tips and Tricks - Special Tasks Debugging Error Codes Property Tags and Types Property Tags and Types for Outlook Items CDO Versions Useful Links Exchange 2000 Feature Overview Exchange Server Scripting and Routing All you ever wanted to know about ASP & CDO Code Sample Library Links @ Microsoft Links @ the World Newsgroups & Mailing lists Programming Language Resources Training & Book Recommendations Knowledge Base Articles Exchange & Outlook Build Info Recommended Third Party Applications Subscribe to Slipstick.com's Exchange Messaging Outlook newsletter Common Tasks | Special TasksTips and Tricks - Common Tasks This tips and tricks section provides some basic and also special tasks for CDO. Note that the following examples should serve only as an idea to create your own solution and are not checked for proper function. You can find a lot of checked and proper running samples at the CDOLive Code Sample Library.For a list of the most common MAPI property tags, please take a look at 'Digging deeper into CDO', Property Tags and Types or use the CDO.HLP file, which is located on the Microsoft Exchange Server 5.5 CD-ROM. Note, that an updated version is included with the Microsoft Exchange Server 5.5 Service Pack 1 (or higher). You can also download the most current version from CDOLive cdo.zip (1,065 Kbyte).Common Tasks Task Description Variable declaration and explicit variable checking Always use:Option Explicit and then:Dim Variable Note that only VBA And VB supports explicit variable declaration like this: Dim Variable As Type statement to prevent problems with non declared variables. Make your variables self explaining (e. g. objSession, objAddressList, objAddressEntries) to avoid unreadable code. Work with objects and collections Before and after you use an object or a collection in VBScript or JScript, always use:Set Object = Nothingto free up used system resources. Note that this is not required when working with Visual Basic or VBA. Task Description Implement a detailed error trapping B