Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 213
  • Last Modified:

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!
0
stev0931
Asked:
stev0931
  • 8
  • 6
3 Solutions
 
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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
 
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

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 8
  • 6
Tackle projects and never again get stuck behind a technical roadblock.
Join Now