<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: CDOSYS error '80040213' - failed to connect to server in Tech Help - Software/Hardware etc</title>
    <link>https://community.plus.net/t5/Tech-Help-Software-Hardware-etc/CDOSYS-error-80040213-failed-to-connect-to-server/m-p/1395145#M75123</link>
    <description>&lt;P&gt;Bummer about the SSL, so what about the outcome of a plain text send test?&lt;/P&gt;</description>
    <pubDate>Tue, 13 Dec 2016 14:26:46 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2016-12-13T14:26:46Z</dc:date>
    <item>
      <title>CDOSYS error '80040213' - failed to connect to server</title>
      <link>https://community.plus.net/t5/Tech-Help-Software-Hardware-etc/CDOSYS-error-80040213-failed-to-connect-to-server/m-p/1394740#M75092</link>
      <description>&lt;P&gt;does anyone here have any experience of classic ASP and CDOSYS email?&lt;/P&gt;
&lt;P&gt;i posted this over on stackoverflow, but so far not having any luck&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a Windows Server 2003 R2 running IIS and a website using classic ASP. Trying to get it to use CDOSYS to email using our own (externally) hosted office365 exchange server.&lt;/P&gt;
&lt;P&gt;I get the following error&lt;/P&gt;
&lt;PRE class="default prettyprint prettyprinted"&gt;&lt;CODE&gt;&lt;SPAN class="pln"&gt;CDO&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="typ"&gt;Message&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="lit"&gt;1&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; error &lt;/SPAN&gt;&lt;SPAN class="str"&gt;'80040213'&lt;/SPAN&gt;
&lt;SPAN class="typ"&gt;The&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; transport failed to connect to the server&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Which usually means one of 3 problems: 1. Incorrect SMTP server / port 2. Incorrect login/password 3. FROM address not valid according to SMTP server (wrong domain)&lt;/P&gt;
&lt;P&gt;The SMTP server and port are correct according to supplier. The login/password is correct as I can log into the mail account using those details The FROM address is correct as that is the account I am using to log in.&lt;/P&gt;
&lt;P&gt;I can telnet to the exchange server from the web server on that address and port, so a connection can be made from the server at least.&lt;/P&gt;
&lt;P&gt;So at the moment I'm at a loss as to what the problem might be. Does anyone have any pointers as to anything else I need to look at?&lt;/P&gt;
&lt;DIV class="post-text"&gt;
&lt;P&gt;This is the config the website is using&lt;/P&gt;
&lt;PRE class="default prettyprint prettyprinted"&gt;&lt;CODE&gt;&lt;SPAN class="pln"&gt;myMail&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="typ"&gt;Configuration&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="typ"&gt;Fields&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="typ"&gt;Item&lt;/SPAN&gt; &lt;SPAN class="pun"&gt;(&lt;/SPAN&gt;&lt;SPAN class="str"&gt;"http://schemas.microsoft.com/cdo/configuration/sendusing"&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;)=&lt;/SPAN&gt;&lt;SPAN class="lit"&gt;2&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; 
myMail&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="typ"&gt;Configuration&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="typ"&gt;Fields&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="typ"&gt;Item&lt;/SPAN&gt; &lt;SPAN class="pun"&gt;(&lt;/SPAN&gt;&lt;SPAN class="str"&gt;"http://schemas.microsoft.com/cdo/configuration/smtpserver"&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;)=&lt;/SPAN&gt;&lt;SPAN class="str"&gt;"smtp.office365.com"&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;
myMail&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="typ"&gt;Configuration&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="typ"&gt;Fields&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="typ"&gt;Item&lt;/SPAN&gt; &lt;SPAN class="pun"&gt;(&lt;/SPAN&gt;&lt;SPAN class="str"&gt;"http://schemas.microsoft.com/cdo/configuration/smtpserverport"&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;)=&lt;/SPAN&gt;&lt;SPAN class="lit"&gt;587&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;
myMail&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="typ"&gt;Configuration&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="typ"&gt;Fields&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="typ"&gt;Item&lt;/SPAN&gt; &lt;SPAN class="pun"&gt;(&lt;/SPAN&gt;&lt;SPAN class="str"&gt;"http://schemas.microsoft.com/cdo/configuration/smtpauthenticate"&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;)&lt;/SPAN&gt; &lt;SPAN class="pun"&gt;=&lt;/SPAN&gt; &lt;SPAN class="lit"&gt;1&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;
myMail&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="typ"&gt;Configuration&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="typ"&gt;Fields&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="typ"&gt;Item&lt;/SPAN&gt; &lt;SPAN class="pun"&gt;(&lt;/SPAN&gt;&lt;SPAN class="str"&gt;"http://schemas.microsoft.com/cdo/configuration/smtpusessl"&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;)&lt;/SPAN&gt; &lt;SPAN class="pun"&gt;=&lt;/SPAN&gt; &lt;SPAN class="kwd"&gt;True&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;
myMail&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="typ"&gt;Configuration&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="typ"&gt;Fields&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="typ"&gt;Item&lt;/SPAN&gt; &lt;SPAN class="pun"&gt;(&lt;/SPAN&gt;&lt;SPAN class="str"&gt;"http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout"&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;)&lt;/SPAN&gt; &lt;SPAN class="pun"&gt;=&lt;/SPAN&gt; &lt;SPAN class="lit"&gt;20&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;
myMail&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="typ"&gt;Configuration&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="typ"&gt;Fields&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="typ"&gt;Item&lt;/SPAN&gt; &lt;SPAN class="pun"&gt;(&lt;/SPAN&gt;&lt;SPAN class="str"&gt;"http://schemas.microsoft.com/cdo/configuration/sendusername"&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;)&lt;/SPAN&gt; &lt;SPAN class="pun"&gt;=&lt;/SPAN&gt; &lt;SPAN class="str"&gt;"username"&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;
myMail&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="typ"&gt;Configuration&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="typ"&gt;Fields&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="typ"&gt;Item&lt;/SPAN&gt; &lt;SPAN class="pun"&gt;(&lt;/SPAN&gt;&lt;SPAN class="str"&gt;"http://schemas.microsoft.com/cdo/configuration/sendpassword"&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;)&lt;/SPAN&gt; &lt;SPAN class="pun"&gt;=&lt;/SPAN&gt; &lt;SPAN class="str"&gt;"password"&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;DIV class="post-taglist"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="post-taglist"&gt;things already tried:&lt;BR /&gt;port 25 - same error&lt;BR /&gt;"&lt;SPAN&gt;Did you setup an SMTP relay in Office 365?" - yes and same error.&lt;/SPAN&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 12 Dec 2016 13:09:30 GMT</pubDate>
      <guid>https://community.plus.net/t5/Tech-Help-Software-Hardware-etc/CDOSYS-error-80040213-failed-to-connect-to-server/m-p/1394740#M75092</guid>
      <dc:creator>chenks76</dc:creator>
      <dc:date>2016-12-12T13:09:30Z</dc:date>
    </item>
    <item>
      <title>Re: CDOSYS error '80040213' - failed to connect to server</title>
      <link>https://community.plus.net/t5/Tech-Help-Software-Hardware-etc/CDOSYS-error-80040213-failed-to-connect-to-server/m-p/1395015#M75110</link>
      <description>&lt;P&gt;I have to ask&amp;nbsp;&lt;a href="https://community.plus.net/t5/user/viewprofilepage/user-id/23303"&gt;@chenks76&lt;/a&gt; but I assume you are calling the Update Method prior to execution?&lt;/P&gt;
&lt;PRE&gt;myMail.Configuration.Fields.Update&lt;/PRE&gt;
&lt;P&gt;Also, have you tried extending the connection timeout?&lt;/P&gt;</description>
      <pubDate>Tue, 13 Dec 2016 09:55:13 GMT</pubDate>
      <guid>https://community.plus.net/t5/Tech-Help-Software-Hardware-etc/CDOSYS-error-80040213-failed-to-connect-to-server/m-p/1395015#M75110</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-12-13T09:55:13Z</dc:date>
    </item>
    <item>
      <title>Re: CDOSYS error '80040213' - failed to connect to server</title>
      <link>https://community.plus.net/t5/Tech-Help-Software-Hardware-etc/CDOSYS-error-80040213-failed-to-connect-to-server/m-p/1395017#M75111</link>
      <description>&lt;P&gt;this is the full script&lt;/P&gt;
&lt;PRE&gt;Set myMail=CreateObject("CDO.Message")
myMail.Subject="TEST"
myMail.To="*****@*****.co.uk"
myMail.TextBody="TEST"

myMail.From="*****@*****.co.uk"
myMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing")=2 
myMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver")="smtp.office365.com"
myMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport")=587
myMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
myMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = 1
myMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
myMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusername") = "*****@*****.co.uk"
myMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "PASSWORD"

myMail.Configuration.Fields.Update
myMail.Send
set myMail=nothing&lt;/PRE&gt;
&lt;P&gt;the timeout makes no difference, as it's an instant fail.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Dec 2016 09:58:21 GMT</pubDate>
      <guid>https://community.plus.net/t5/Tech-Help-Software-Hardware-etc/CDOSYS-error-80040213-failed-to-connect-to-server/m-p/1395017#M75111</guid>
      <dc:creator>chenks76</dc:creator>
      <dc:date>2016-12-13T09:58:21Z</dc:date>
    </item>
    <item>
      <title>Re: CDOSYS error '80040213' - failed to connect to server</title>
      <link>https://community.plus.net/t5/Tech-Help-Software-Hardware-etc/CDOSYS-error-80040213-failed-to-connect-to-server/m-p/1395059#M75112</link>
      <description>&lt;P&gt;Well it looks quite sane to me, have you tried to send a plain email using something like this:&lt;/P&gt;
&lt;PRE&gt;Set myMail = CreateObject("CDO.Message")
myMail.Subject = “Test eMail CDO“
myMail.From = “sender@domain”
myMail.To = “recipient@domain”
myMail.TextBody = "This is a test message"
On Error Resume Next
myMail.Send
If Err.Number &amp;gt; 0 Then
   Output Err.Description Here
End If
set myMail = Nothing&lt;/PRE&gt;
&lt;P&gt;If this works try turning off SSL to see if that changes anything.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Dec 2016 11:32:11 GMT</pubDate>
      <guid>https://community.plus.net/t5/Tech-Help-Software-Hardware-etc/CDOSYS-error-80040213-failed-to-connect-to-server/m-p/1395059#M75112</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-12-13T11:32:11Z</dc:date>
    </item>
    <item>
      <title>Re: CDOSYS error '80040213' - failed to connect to server</title>
      <link>https://community.plus.net/t5/Tech-Help-Software-Hardware-etc/CDOSYS-error-80040213-failed-to-connect-to-server/m-p/1395097#M75114</link>
      <description>&lt;P&gt;&lt;a href="https://community.plus.net/t5/user/viewprofilepage/user-id/23303"&gt;@chenks76&lt;/a&gt; - You said you can telnet in to the server but you may want to verify the SSL side of the connection; so if you have access to a Linux / Mac CLI with OpenSSL installed, you can try this, using your email address and password:&lt;/P&gt;
&lt;PRE&gt;echo -ne ‘\0address@domain.co.uk\0password’ | base64&lt;/PRE&gt;
&lt;P&gt;This will output a base64 encoded string to the console, you’ll need this later. Now execute this:&lt;/P&gt;
&lt;PRE&gt;openssl s_client -connect smtp.office365.com:587 -starttls smtp&lt;/PRE&gt;
&lt;P&gt;When you’re connected you should see a 250 response, so enter &lt;/P&gt;
&lt;PRE&gt;EHLO there&lt;/PRE&gt;
&lt;P&gt;This will print the verbs supported by the server, the one you’d be interested in is ‘AUTH PLAIN LOGIN’&lt;/P&gt;
&lt;P&gt;If you see this in the response list use :&lt;/P&gt;
&lt;PRE&gt;AUTH PLAIN PasteBase64Here&lt;/PRE&gt;
&lt;P&gt;Assuming all is well you should see a 235 response code. So enter:&lt;/P&gt;
&lt;PRE&gt;quit&lt;/PRE&gt;
&lt;P&gt;to exit.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Dec 2016 12:22:16 GMT</pubDate>
      <guid>https://community.plus.net/t5/Tech-Help-Software-Hardware-etc/CDOSYS-error-80040213-failed-to-connect-to-server/m-p/1395097#M75114</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-12-13T12:22:16Z</dc:date>
    </item>
    <item>
      <title>Re: CDOSYS error '80040213' - failed to connect to server</title>
      <link>https://community.plus.net/t5/Tech-Help-Software-Hardware-etc/CDOSYS-error-80040213-failed-to-connect-to-server/m-p/1395099#M75115</link>
      <description>i only have access to the Windows 2003 R2 web server.</description>
      <pubDate>Tue, 13 Dec 2016 12:24:09 GMT</pubDate>
      <guid>https://community.plus.net/t5/Tech-Help-Software-Hardware-etc/CDOSYS-error-80040213-failed-to-connect-to-server/m-p/1395099#M75115</guid>
      <dc:creator>chenks76</dc:creator>
      <dc:date>2016-12-13T12:24:09Z</dc:date>
    </item>
    <item>
      <title>Re: CDOSYS error '80040213' - failed to connect to server</title>
      <link>https://community.plus.net/t5/Tech-Help-Software-Hardware-etc/CDOSYS-error-80040213-failed-to-connect-to-server/m-p/1395145#M75123</link>
      <description>&lt;P&gt;Bummer about the SSL, so what about the outcome of a plain text send test?&lt;/P&gt;</description>
      <pubDate>Tue, 13 Dec 2016 14:26:46 GMT</pubDate>
      <guid>https://community.plus.net/t5/Tech-Help-Software-Hardware-etc/CDOSYS-error-80040213-failed-to-connect-to-server/m-p/1395145#M75123</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-12-13T14:26:46Z</dc:date>
    </item>
    <item>
      <title>Re: CDOSYS error '80040213' - failed to connect to server</title>
      <link>https://community.plus.net/t5/Tech-Help-Software-Hardware-etc/CDOSYS-error-80040213-failed-to-connect-to-server/m-p/1395146#M75124</link>
      <description>how do i attempt a plan text send?&lt;BR /&gt;the office365 server only allows connections based on the parameters that are already attempting to be used.&lt;BR /&gt;&lt;BR /&gt;i'm leaning towards this being an issue with the web server rather than the SMTP server, however i have nothing to base this on really.</description>
      <pubDate>Tue, 13 Dec 2016 14:31:23 GMT</pubDate>
      <guid>https://community.plus.net/t5/Tech-Help-Software-Hardware-etc/CDOSYS-error-80040213-failed-to-connect-to-server/m-p/1395146#M75124</guid>
      <dc:creator>chenks76</dc:creator>
      <dc:date>2016-12-13T14:31:23Z</dc:date>
    </item>
    <item>
      <title>Re: CDOSYS error '80040213' - failed to connect to server</title>
      <link>https://community.plus.net/t5/Tech-Help-Software-Hardware-etc/CDOSYS-error-80040213-failed-to-connect-to-server/m-p/1395149#M75125</link>
      <description>&lt;P&gt;You send a plain text mail using the code from message 4 with the Form and To fields completed with proper addresses, ideally it would be best to send it to yourself using the same From and To.&lt;/P&gt;
&lt;P&gt;It’s not going through your mail server but will be sent locally using the CDO which is why the pseudo ASP is so minimal.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Dec 2016 14:42:05 GMT</pubDate>
      <guid>https://community.plus.net/t5/Tech-Help-Software-Hardware-etc/CDOSYS-error-80040213-failed-to-connect-to-server/m-p/1395149#M75125</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-12-13T14:42:05Z</dc:date>
    </item>
    <item>
      <title>Re: CDOSYS error '80040213' - failed to connect to server</title>
      <link>https://community.plus.net/t5/Tech-Help-Software-Hardware-etc/CDOSYS-error-80040213-failed-to-connect-to-server/m-p/1395163#M75126</link>
      <description>just tried that and nothing happens.&lt;BR /&gt;no email is received, no error either</description>
      <pubDate>Tue, 13 Dec 2016 15:03:02 GMT</pubDate>
      <guid>https://community.plus.net/t5/Tech-Help-Software-Hardware-etc/CDOSYS-error-80040213-failed-to-connect-to-server/m-p/1395163#M75126</guid>
      <dc:creator>chenks76</dc:creator>
      <dc:date>2016-12-13T15:03:02Z</dc:date>
    </item>
  </channel>
</rss>

