Hello.
I am trying to send an email from ASP code, using CDO.Message object on a
Windows 2003 server
and I get the following error:
CDO.Message.1 error '80040213'
The transport failed to connect to the server.
The error occurs in the line where the Send method is called: "objMsg.Send".
Here is my code:
Sub
SendEmail(strFromName,strFromAddr,strRecipName,str RecipAddr,strCC,strSubject
,strBody,strFormat)
dim objMsg,objConf
set objMsg = Server.CreateObject("CDO.Message")
set objConf = Server.CreateObject("CDO.Configuration")
objConf.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver")
= "localhost"
objConf.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverpor
t") = 25
objConf.Fields("http://schemas.microsoft.com/cdo/configuration/SendUsing")
= 2
objConf.Fields.Update()
objMsg.Configuration = objConf
objMsg.From = strFromAddr
objMsg.To = strRecipAddr
objMsg.CC = strCC
objMsg.Subject = strSubject
if CInt(strFormat)=0 then objMsg.HtmlBody = strBody else objMsg.TextBody =
strBody
objMsg.Send
set objConf = nothing
set objMsg = nothing
End Sub
I really cannot find the problem, can someone help?
Thanks a lot.