CDO.Message

P

Paul

I am using CDO.Message object with code below. When I execute the .Send
command, I get the following error.

Error: -2147220973
Description: The transport failed to connect to the server.

Note: The SMTP Server and the IIS Server are the same machine.

Anyone come across this error message in the past? This error also occurs
when I use Method #1 where I use the schema reference provided by Microsoft.

Here is the code:

<!--
METADATA
TYPE="typelib"
UUID="CD000000-8B95-11D1-82DB-00C04FB1625D"
NAME="CDO for Windows 2000 Library"
-->

<%
'METHOD #2
Set cdoConfig = CreateObject("CDO.Configuration")

With cdoConfig.Fields
.Item(cdoSendUsingMethod) = cdoSendUsingPort
.Item(cdoSMTPServer) = "10.60.19.24"
.Item(cdoSMTPServerPort) = "25"
.Update
End With

Set cdoMessage = CreateObject("CDO.Message")

With cdoMessage
Set .Configuration = cdoConfig
.From = "(e-mail address removed)"
.To = "(e-mail address removed)"
.Subject = "Sample CDO Message"
.TextBody = "This is a test for CDO.message"
.Send
End With

Set cdoMessage = Nothing
Set cdoConfig = Nothing
 
D

Dr. Know

Paul said:
I am using CDO.Message object with code below. When I execute the .Send
command, I get the following error.

Error: -2147220973
Description: The transport failed to connect to the server.

This is a Server Not Found error. CDOSYS is not recognizing the
server name as supplied.

Also, using the cdoSendUsingPort method, you may have to provide
authentication credentials - unless you're running an open relay mail
server - (please say you're not...)
Note: The SMTP Server and the IIS Server are the same machine.
.Item(cdoSendUsingMethod) = cdoSendUsingPort

If they are on the same machine, you should probably skip the
cdoSendUsingPort and use the drop directory instead.
.Item(cdoSMTPServer) = "10.60.19.24"
.Item(cdoSMTPServerPort) = "25"

I'm don't believe this is the correct connection string for the
SMTPServer name and see above note. Also make sure you're SMTP server
is using port 25. (It IS the default.)

Try the NetBios computer name instead of the ip address.
With NO slashes - i.e.

ComputerServer1

It should work.

FWIW,
Greg







Dr. Know
 
D

Dr. Know

Dr. Know said:
I'm don't believe this is the correct connection string for the
SMTPServer name and see above note. Also make sure you're SMTP server
is using port 25. (It IS the default.)

Nix that first statement - I'm a moron today...

An IP address is allowable, but you probably will have to provide an
authenticated machine user account and password - like this:

With mobjFlds
.Item(cdoSendUsingMethod) = cdoSendUsingPort
.Item(cdoSMTPConnectionTimeout) = 60
.Item(cdoSMTPAuthenticate) = cdoBasic
.Item(cdoSMTPServer) = "ComputerServer1" OR "192.168.0.1"
.Item(cdoSMTPServerPort) = 25
.Item(cdoSendUserName) = "someuser"
.Item(cdoSendPassword) = "somepassword"
.Update <----
End With


Greg








Dr. Know
 
D

Dr. Know

Paul said:
.Item(cdoSMTPServer) = "10.60.19.24"
.Item(cdoSMTPServerPort) = "25"

I'm a double idiot today...

The port number should be a number, not a string.


25, not "25"


Greg


Dr. Know
 
S

Steven Burn

Third time lucky ;o) ([sarcasm] how about "Dr 'except when I'm an idiot' Know" ?? <vbg> [/sarcasm])

--

Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

| Paul said:
|
| > .Item(cdoSMTPServer) = "10.60.19.24"
| > .Item(cdoSMTPServerPort) = "25"
|
| I'm a double idiot today...
|
| The port number should be a number, not a string.
|
|
| 25, not "25"
|
|
| Greg
|
|
| Dr. Know
 
D

Dr. Know

Steven Burn said:
Third time lucky ;o) ([sarcasm] how about "Dr 'except when I'm an idiot' Know" ?? <vbg> [/sarcasm])

What can I say, it's a left-over nym, I'm too lazy to change it. :-\

I've got a VBA, an InterDev, a newsreader, a MMC console to a local
server, and a TV window open...
It's amazing I can keep *any* thoughts marshalled... Wanker. ;-)
<vbg>


Greg






Dr. Know
 
S

Steven Burn

;o)

--

Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

| Steven Burn said:
|
| >Third time lucky ;o) ([sarcasm] how about "Dr 'except when I'm an idiot' Know" ?? <vbg> [/sarcasm])
|
| What can I say, it's a left-over nym, I'm too lazy to change it. :-\
|
| I've got a VBA, an InterDev, a newsreader, a MMC console to a local
| server, and a TV window open...
| It's amazing I can keep *any* thoughts marshalled... Wanker. ;-)
| <vbg>
|
|
| Greg
|
|
|
|
|
|
| Dr. Know
 

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

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top