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.Configurati on.
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.Configurati on()
' Specify the configuration.
Config.Fields(c doSendUsingMeth od) = cdoSendUsingPor t
Config.Fields(c doSMTPServer) = "test.mailserve r.com"
Config.Fields(c doSMTPServerPor t) = 25
Config.Fields(c doSMTPAuthentic ate) = cdoBasic
Config.Fields(c doSendUserName) = "username"
Config.Fields(c doSendPassword) = "password"
' Update the configuration.
Config.Fields.U pdate()
MyMessage.Confi guration = Config
' Create the message.
MyMessage.To = "so*****@somewh ere.com"
MyMessage.From = "me@somewhere.c om"
MyMessage.Subje ct = "Hello"
MyMessage.TextB ody = "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