Error using CDOSYS for email

I am getting this error when I try to send email using CDOSYS for email inside of an ASP application running on Microsoft IIS:

CDO.Message.1 error '80040213'

The transport failed to connect to the server.

/cdhdnew/peermentoring/forum/functions/functions_send_mail.asp, line
198


Any suggestions on what might be wrong would be most appreciated.  Thanks!
stev0931Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Irwin SantosComputer Integration SpecialistCommented:
do you have SMTP on the server running as a service?

AND/OR

do you have the correct authentication.
0
stev0931Author Commented:
SMTP is not running as a service on the local machine.  The ASP application we're using that requires CDOSYS email allowed us to specify an SMTP server in the web interface and we specified one - but it's different from the machine the ASP application using CDOSYS email is on.
0
Irwin SantosComputer Integration SpecialistCommented:
install/enable SMTP.
0
Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

Irwin SantosComputer Integration SpecialistCommented:
What Server OS are your running?
What IIS version?
0
stev0931Author Commented:
Windows Server 2003
IIS 6.0

I didn't think I had to have an SMTP adapter installed on the local machine.  Was this an incorrect assumption?
0
stev0931Author Commented:
If there is any way to get CDOSYS to work without installing an SMTP adapter on the local machine, that would be best (we have a machine that already has SMTP on it that is dedicated to email)
0
Irwin SantosComputer Integration SpecialistCommented:
are you specifying the SMTP server address of your dedicated mail system?
0
stev0931Author Commented:
yes, through the web interface of the ASP application (it requests an SMTP server, and I specified the dedicated mail system)

I should note I have done nothing to configure CDOSYS on the machine running the ASP application.  Do I need to do something there?
0
Irwin SantosComputer Integration SpecialistCommented:
Take a look at the sample code...Make sure you configuration fields are OK
--------------------------------------------------------

<%
Set oMail = Server.CreateObject("CDO.Message")
Set iConf = Server.CreateObject("CDO.Configuration")
Set Flds = iConf.Fields
iConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 1
iConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.xyz.com"
iConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 10
iConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
iConf.Fields.Update
Set oMail.Configuration = iConf
oMail.To             = "webmaster@xyz.com"
oMail.From             = "webmaster@xyz.com"
oMail.Subject             = "Subject"
oMail.TextBody             = "Body"
oMail.Send
Set iConf = Nothing
Set Flds = Nothing
%>
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Irwin SantosComputer Integration SpecialistCommented:
Since you are using the External server...follow that example.. should you turn on SMTP then the latter.

External server / IP
iConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
iConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.xyz.com"

Local service (dont change)
iConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 1
iConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "http://127.0.0.1
0
stev0931Author Commented:
I typed the code


<html>
<%
Set oMail = Server.CreateObject("CDO.Message")
Set iConf = Server.CreateObject("CDO.Configuration")
Set Flds = iConf.Fields
iConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
iConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.organization.edu"
iConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 10
iConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
iConf.Fields.Update
Set oMail.Configuration = iConf
oMail.To           = "steve@organization.edu"
oMail.From           = "steve@organization.edu"
oMail.Subject           = "Test1"
oMail.TextBody           = "Test2"
oMail.Send
Set iConf = Nothing
Set Flds = Nothing
%>
<h1>Hello!</h1>
</html>





and got the error



CDO.Message.1 error '80040213'

The transport failed to connect to the server.

/testemail.asp, line 16




Does something special need to be set up on smtp.organization.edu?  Any suggestions?
0
Irwin SantosComputer Integration SpecialistCommented:
does SMTP.organization.edu allow RELAYING of internal next work servers?
0
stev0931Author Commented:
It's working now.  Thanks!
0
Irwin SantosComputer Integration SpecialistCommented:
cool. thank you
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Development

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.