title: Couldn't send message to SMTP server. Transport Error 0x80040217
body: <p>I get this error when sending a mail through asp using gmail, I already used ports 465, 587 and 25 with same results</p>
  
  <p>Dim mail 
  dim email2 as string
  dim urlms as string</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>Dim mail 
  dim email2 as string
  dim urlms as string
      
  
  mail = CreateObject("CDO.Message")    
  urlms = "http://schemas.microsoft.com/cdo/configuration/" 
  mail.Configuration.Fields.Item(urlms  &amp; "sendusing") = 2 'enviar usando port
  mail.Configuration.Fields.Item(urlms  &amp; "smtpserver") = "smtp.gmail.com"
  mail.Configuration.Fields.Item(urlms  &amp; "smtpserverport") = 465
  mail.Configuration.Fields.Item(urlms  &amp; "smtpusessl") = True
  mail.Configuration.Fields.Item(urlms  &amp; "smtpconnectiontimeout") = 60
  mail.Configuration.Fields.Item(urlms + "smtpauthenticate") = 1
  mail.Configuration.Fields.Item(urlms + "sendusername") = "" 'login
  mail.Configuration.Fields.Item(urlms + "sendpassword") = "" 'password
  
  mail.Configuration.Fields.Update
  
  mail.Send</code></pre>
  </div>
  </div>
  </p>