Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > CDO.Message

Reply
Thread Tools

CDO.Message

 
 
Paul
Guest
Posts: n/a
 
      01-25-2005
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 = ""
.To = ""
.Subject = "Sample CDO Message"
.TextBody = "This is a test for CDO.message"
.Send
End With

Set cdoMessage = Nothing
Set cdoConfig = Nothing
 
Reply With Quote
 
 
 
 
Dr. Know
Guest
Posts: n/a
 
      01-25-2005
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
 
Reply With Quote
 
 
 
 
Dr. Know
Guest
Posts: n/a
 
      01-25-2005
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
 
Reply With Quote
 
Dr. Know
Guest
Posts: n/a
 
      01-25-2005
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
 
Reply With Quote
 
Steven Burn
Guest
Posts: n/a
 
      01-25-2005
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!

"Dr. Know" <> wrote in message news:...
| 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
 
Reply With Quote
 
Dr. Know
Guest
Posts: n/a
 
      01-25-2005
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
 
Reply With Quote
 
Steven Burn
Guest
Posts: n/a
 
      01-25-2005
;o)

--

Regards

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

Keeping it FREE!

"Dr. Know" <> wrote in message news:...
| 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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off




Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57