Cdo.message Error Checking
Contents |
to catch problem emails? If this is your first visit, be sure cdo.message error codes to check out the FAQ by clicking the link above.
Vbscript Cdo Message Error Handling
You may have to register before you can post: click the register link above to
Cdo Error
proceed. To start viewing messages, select the forum that you want to visit from the selection below. Results 1 to 3 of 3 Thread: Sending
Cdo.message.1 The Transport Failed To Connect To The Server
Emails with CDO, how to catch problem emails? Tweet Thread Tools 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 cdo.message vbscript 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.Config
resources Windows Server 2012 resources Programs MSDN subscriptions Overview Benefits Administrators Students Microsoft Imagine Microsoft Student Partners ISV Startups TechRewards Events Community Magazine Forums Blogs Channel 9 Documentation APIs and reference Dev centers Retired content Samples We’re sorry. The content you requested has been removed. You’ll be auto redirected in 1 second. CDO Library CDO Library Guide Programming Tasks Programming Tasks Handling Errors Handling Errors Handling Errors Accessing Folders Adding Attachments to a Message Changing an Existing http://www.vbforums.com/showthread.php?520679-Sending-Emails-with-CDO-how-to-catch-problem-emails Address Entry Checking for New Mail Copying a Message to Another Folder Creating a New Address Book Entry Creating and Sending a Message Customizing a Folder or Message Deleting a Message Filtering Messages in a Folder Handling Errors Improving Application Performance Making Sure the Message Gets There Moving a Message to Another Folder Organizing a https://msdn.microsoft.com/en-us/library/ms527204(v=exchg.10).aspx Meeting Posting Messages to a Public Folder Reading a Message from the Inbox Searching for a Folder Searching for a Message Selecting Recipients from the Address Book Starting a CDO Session Using Addresses Viewing MAPI Properties Working with Conversations Working with Distribution Lists TOC Collapse the table of content Expand the table of content This documentation is archived and is not being maintained. This documentation is archived and is not being maintained. Handling Errors Exchange Server 2003 Topic Last Modified: 2004-06-09 Handling Errors The CDO Library raises exceptions for all errors. When you write Microsoft® Visual Basic® applications that use the CDO Library, use the same run-time error handling techniques that you use in all your Visual Basic applications: the Visual Basic On Error GoTo statement. Note that the error values and error handling techniques vary slightly depending on whether you are using Visual Basic version 4.0 or older versions of Visual Basic for Applications. When you use older v
of sending CDO.Message - ASP Components Hi, I have been searching all over the internet and MSDN for a http://www.justskins.com/forums/checking-success-failure-of-45537.html simple answer and have found none... I have some ASP/VbScript http://stackoverflow.com/questions/7705005/how-to-check-is-mymail-send-is-true-false code (that I didn't write) to send an email from a Win2k server: -------------------------------------------------- set iMsg = CreateObject("CDO.Message") iMsg.To = toEmail iMsg.From = fromEmail iMsg.Subject = subject iMsg.TextBody = message on error resume next Dim iCong, Flds, serverError serverError = message error -2147220973 set iConf = CreateObject("CDO.Configuration") set iFlds = iConf.Fields 'Set the CDO configuration fields to send mail on specified external smtp server iFlds.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 iFlds.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = anSMTPaddress iFlds.Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 5 iFlds.Update Set aMessage.Configuration = iConf aMessage.send ... Thread Tools Show Printable Version Email this Page… Subscribe to this Thread… Display cdo.message error checking Linear Mode Switch to Hybrid Mode Switch to Threaded Mode May 31st,03:36 PM #1 Checking success/failure of sending CDO.Message Hi, I have been searching all over the internet and MSDN for a simple answer and have found none... I have some ASP/VbScript code (that I didn't write) to send an email from a Win2k server: -------------------------------------------------- set iMsg = CreateObject("CDO.Message") iMsg.To = toEmail iMsg.From = fromEmail iMsg.Subject = subject iMsg.TextBody = message on error resume next Dim iCong, Flds, serverError serverError = -2147220973 set iConf = CreateObject("CDO.Configuration") set iFlds = iConf.Fields 'Set the CDO configuration fields to send mail on specified external smtp server iFlds.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 iFlds.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = anSMTPaddress iFlds.Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 5 iFlds.Update Set aMessage.Configuration = iConf aMessage.send if err.number = serverError then 'redirect to message-failure-page else 'redirect to message-success-page end if -------------------------------------------------- Simple enough. I have found the the serverError variable corresponds to a value on this page: [url]http://msdn.microsoft.com/library/default.as
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up How to check is myMail.Send is true/false up vote 3 down vote favorite 3 <% Dim sent Dim YourName Dim YourEmail Dim YourMessage Set myMail2=CreateObject("CDO.Message") YourName = Trim(Request.Form("Name")) YourEmail = Trim(Request.Form("Email")) YourMessage = Trim(Request.Form("Message")) Dim Body Dim body2 Body = Body & "Their Name: " & VbCrLf & YourName & VbCrLf & VbCrLf Body = Body & "Their Email: " & VbCrLf & YourEmail & VbCrLf & VbCrLf Body = Body & "Their Message: " & VbCrLf & YourMessage & VbCrLf & VbCrLf Set myMail=CreateObject("CDO.Message") myMail.Subject="A New Enquiry!" myMail.From="admin@musicalmatters.co.uk" myMail.To="james@devine.eu" myMail.TextBody=Body myMail.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/sendusing")=2 'Name or IP of remote SMTP server myMail.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/smtpserver")="smtp.1and1.com" 'Server port myMail.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/smtpserverport")=25 myMail.Configuration.Fields.Update myMail.Send set myMail=nothing body2="Thank you for contacting us!" & VbCrLf & "This is just a brief message to let you know your form was submitted successfully!"& VbCrLf & VbCrLf & "You may reply to this address, but you may not necessarily receive a reply, "& "you should receive a reply in 1-2 business day(s)!"& VbCrLf & "Thank you very much,"& VbCrLf & VbCrLf & "Musical Matters."& VbCrLf & "admin@musicalmatters.co.uk" Set myMail2=CreateObject("CDO.Message") myMail2.Subject="Thanks for Contacting Us!" myMail2.From="admin@musicalmatters.co.uk" myMail2.To=YourEmail myMail2.TextBody=body2 myMail2.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/sendusing")=2 'Name or IP of remote SMTP server myMail2.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/smtpserver")="smtp.1and1.com" 'Server port myMail2.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/smtpserverport")=25 myMail2.Configuration.Fields.Update myMail2.Send If myMail2.Send="" Then Response.Redirec