I am using CDO for Windows 2000 to send emails. There is a method
..Send() of CDO.Message object, I call this method and usualy
averything is fine. But how can I be sure that the message was
successfully sent? If SMTP server is not accessible, for example,
there are no error messages, no exceptions, everything goes smoothly,
except for the fact, that no messages are sent out.
Does .Send() method return some error values?
This is extract from my code:
Set cdoConfig = CreateObject("CDO.Configuration")
With cdoConfig.Fields
.Item(cdoSendUsingMethod) = cdoSendUsingPort
.Item(cdoSMTPServerPort) = myPort
.Item(cdoSMTPServer) = "myServer"
.Item(cdoSendUserName) = "myName"
.Item(cdoSendPassword) = "myPassword"
.Update
End With
Set Msg = CreateObject("CDO.Message")
Set Msg.Configuration = cdoConfig
Msg.To = te**@address.com
Msg.From = my*******@myHome.com
Msg.Subject = "Test subject"
Msg.TextBody = "Body of test message"
Msg.Send