Hi all
As I subscribe MSDN I got an USB-memory with Microsoft eLearing library.
I found an exampell how to send SMTP e-mail using CDO.Message object and
CDO.Configuration.
But when I try to send it, it answers, "The transport failed to connect
to server". I suppose that means the SMTP-server. Since I used that
SMTP-server several times when I send e-mail, I can't figure out why I
doesn't work. Has anyone succeeded to run the mail-example?
Note: I don't use user/password, so I changed Authenticate to cdoAnonymous.
Regards
Henrik Bergman
Dim MyMessage As New CDO.Message()
Dim Config As New CDO.Configuration()
' Specify the configuration.
Config.Fields(cdoSendUsingMethod) = cdoSendUsingPort
Config.Fields(cdoSMTPServer) = "test.mailserver.com"
Config.Fields(cdoSMTPServerPort) = 25
Config.Fields(cdoSMTPAuthenticate) = cdoBasic
Config.Fields(cdoSendUserName) = "username"
Config.Fields(cdoSendPassword) = "password"
' Update the configuration.
Config.Fields.Update()
MyMessage.Configuration = Config
' Create the message.
MyMessage.To = "so*****@somewhere.com"
MyMessage.From = "me@somewhere.com"
MyMessage.Subject = "Hello"
MyMessage.TextBody = "This is the message!"
' Send the CDOSYS Message
MyMessage.Send()
--
__________________________________________
Henrik Bergman, X-OBI, mob 070-866 87 72
e-mail: he************@x-obi.com