Guest
|
Posted:
Sat Oct 29, 2005 12:58 am Post subject:
CDO Question |
|
|
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
|
|