CDO Question
Exchange Server Forum Index Exchange Server
Discussion forums for Microsoft Exchange Server users.
Microsoft Outlook
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web ExchangeServerHelp.com
CDO Question

 
Post new topic   Reply to topic    Exchange Server Forum Index -> Development
Author Message
Guest






Posted: Sat Oct 29, 2005 12:58 am    Post subject: CDO Question Reply with quote

Hello,

I have a question about CDO for windows 2000. I want to catch all error
messages when using the "send" function. Can anyone tell me how?

Private Sub cmdSend_Click()
Dim objSendEmail As New CDO.Message

On Error GoTo error

'Send e-mail
objSendEmail.Subject = txtSubject
objSendEmail.Sender = txtSender
objSendEmail.To = txtTo
objSendEmail.TextBody = txtMessage

objSendEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
objSendEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver") =
txtSMTPServer
objSendEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25

objSendEmail.Configuration.Fields.Update
objSendEmail.Send
Exit Sub
error:
MsgBox Err.Number & ":" & Err.Description

End Sub

Back to top
 
Post new topic   Reply to topic    Exchange Server Forum Index -> Development All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Windows Server Dedicated Servers
New Topics Powered by phpBB