CDO Error

J

JonWayn

Im not sure that this is posted at the correct place but I hope I can get
some help here. I have a routine thats placed in a library mda project and
used on a few computers. It uses CDO to send a simple email. It works fine on
2 computers but just simply refuses to go on the other 2 its suppose to work
on. It fails with an error saying something to the effect "failed
*transport*server*". I have seen multiple posts online regarding this issue
and they all converge on the same solution which I have tried to no avail. I
use the standard configuration settings, SendUsing, Authenticate,
ServerTimeout, etc. Like I stated, it works on 2 PCs so I dont doubt that
those settings are correct. In fact, one of the 2 pcs on which it works,
doesnt even use the configuration settings. I added those settings to PC2
when I started troubleshooting PC3. So I have 2 methods of going about it
that work on separate computers, neither of which works on the others. Any
help would be appreciated.

Set Config = CreateObject("CDO.Configuration")
Set CDOFlds = Config.Fields
1:
With CDOFlds
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") =
"my.my.net"

..Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25

..Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout")
= 10
.Item("http://schemas.microsoft.com/cdo/configuration/sendusername")
= "myusername"
.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword")
= "mypassword"
.Update
End With

Set Msg = CreateObject("CDO.Message")
Set Msg.Configuration = Config
Msg.Subject = SubjectText
Msg.FROM = Sender
Msg.To = Recip
Msg.TextBody = BodyText
Msg.Send

Set CDOFlds = Nothing
Set Config = Nothing
Set Msg = Nothing
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top