Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

CDO.Message.1 error '80040213'The transport failed to connect to the server

Posted on 2010-11-19
6
Medium Priority
?
7,270 Views
Last Modified: 2012-05-10
Hi There

All of a sudden our website CDO script no longer sends forms.  We get the message:-

CDO.Message.1 error '80040213'

The transport failed to connect to the server.

/cart/EMailApplication.asp, line 144

I cant think what has changed to stop it working.  The relevant code ( I think) is:-

Function SendEmail(sndMailFromAddress, sndMailFromName, sndMailRecipient, sndMailCC, sndMailSubject, sndMailBody, sndAttachment)
  Dim objMsg
  Dim objConf

  Set objMsg  = Server.CreateObject("CDO.Message")
  Set objConf = Server.CreateObject("CDO.Configuration")

  With objConf.Fields
        .Item(cdoSendUsingMethod) = cdoSendUsingPort
       .Item(cdoSMTPServer) = GlobalMailHost
      .Item(cdoSMTPServerPort) = 25
      .Item(cdoSMTPAuthenticate) = cdoBasic
      .Item(cdoSendUserName) = GlobalMailUsername
      .Item(cdoSendPassword) = GlobalMailPassword
      .Update
  End With



  Set objMsg.Configuration = objConf

  With objMsg
        .From = """" & sndMailFromName & """ <" & sndMailFromAddress & ">"
        .To = sndMailRecipient
        if MailCC <> "" then
               .Cc sndMailCC
        end if
        .Subject = sndMailSubject
        .TextBody = sndMailBody
       if sndAttachment <> "" then
              .AddAttachment sndAttachment
        end if
   .Send (line 144)

And the settings used are:-

GlobalMailHost = "auth.smtp.1and1.co.uk"
GlobalMailUsername = "XXXXX@comptonskinner.co.uk"
GlobalMailPassword = "XXXXXXX"
'GlobalAdminEmail = "XXXX@firstchoice.org.uk"
GlobalAdminEmail = "XXXXXt@cscrecruitment.co.uk"
GlobalCompanyName = "CSC Job Shop"

Any help would really be appreciated.
0
Comment
Question by:antalp71
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 8

Expert Comment

by:saoirse1916
ID: 34174848
It's possible that the mail server was moved off the web server.  If so, you'll have to update the a few lines in your CDO configuration:

 .Item(cdoSendUsingMethod) = cdoSendUsingPort
       .Item(cdoSMTPServer) = GlobalMailHost

Open in new window


You didn't specify here what the value of "cdoSendUsingPort" (probably 2, but it could be 1).  If the server is housed on the same machine as the web server, then set this to 1 -- otherwise use 2.
0
 
LVL 11

Accepted Solution

by:
madgino earned 500 total points
ID: 34176048
There is nothing wrong with the code, you should search somewhere else for the problem.
Check if the smtp server is running, if the ip address of the IIS is not forbidden on the smtp, if firewall allows conections on port 25 on both iis and smtp machine, ping machines from one to another, check if there are any recent windows updates etc.
0
 

Author Comment

by:antalp71
ID: 34187404
Hi

Thanks for the replies.  The mail server is a 1and1 web host mail server and any emails are just forwarded on so the mail server should be functioning.  As for the firewall this should not matter as we are not hosting this email account ourselves.

saoirse1916:

I am not sure what you mean.  Is it not set to port 25 "  .Item(cdoSMTPServerPort) = 25"

The 1and1 settings should be

E-mail Settings

E-mail address website@comptonskinner.co.uk


Incoming E-mail Delivery Points
No.1: Mailbox
Password ********
Virus protection Disabled
Disk space 0.0 MB of 2 GB used

No.2: Forward
Target contact@cscrecruitment.co.uk


Options Auto-responder Off    
Spam filtering Off  


Mail ServerIncoming server (IMAP) imap.1and1.co.uk | | Info
Incoming server (POP) pop.1and1.co.uk | | Info
Outgoing server (SMTP) auth.smtp.1and1.co.uk  
Please note: To send e-mail using the SMTP-Server, activate SMTP Authentication. Please do not use the Secure Password Authentication (SPA) option. Optionally, port 587 can also be used in addition to the default port RFC 2476.


0
Understanding Web Applications

Without even knowing it, most of us are using web applications on a daily basis. Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We often confuse these web applications tools for websites.  So, what is the difference?

 

Author Comment

by:antalp71
ID: 34187471
Hi

Is this script using the correct authentication.  The email account works if I use outlook and set authentication to same as incoming mail server.

.Item(cdoSMTPAuthenticate) = cdoBasic  ?

Your help appreciated
0
 
LVL 8

Assisted Solution

by:saoirse1916
saoirse1916 earned 500 total points
ID: 34188136
>> I am not sure what you mean.  Is it not set to port 25 "  .Item(cdoSMTPServerPort) = 25"

There are two ports referenced.  cdoSMTPServerPort will most likely be 25, but .cdoSendUsingPort should be set to 1 if the mail server is on the same server as the website or 2 if it's on another server.

I would suggest calling 1and1 and asking them for the SMTP server settings, as they probably just moved it and didn't let you (or other webhosting customers) know about it.
0
 

Author Closing Comment

by:antalp71
ID: 34189091
Thank you for your input, I checked the points raised but in the end instead of working on a local copy I checked the hosted page and it turned out to be a 1st draft page with no CDO script settings.  I am shocked and a bit dumbfounded how the page could have reverted to the first draft.  Its almost like all the files got overwritten by a old cached copy.  Not my doing and I am the only one with access.

thank you for your help!
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Although a lot of people devote their energy toward marketing for specific industries, there are some basic principles that can be applied to any sector imaginable. We’ll look at four steps to take and examine how those steps were put into action fo…
When it comes to security, close monitoring is a must. According to WhiteHat Security annual report, a substantial number of all web applications are vulnerable always. Monitis offers a new product - fully-featured Website security monitoring and pr…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Suggested Courses

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question