title: Sending an email over TLS
body: <p>I've try send email using TLS and port number is 587 with server name is smtp.gmail.com but always got error "error '8004020e'". I set SSL to false because the port 587 Authentication is TLS. Any wrong in my code?</p>
  
  <pre><code>Set objMail = Server.CreateObject("CDO.Message")
  
  Set objConfig = CreateObject("CDO.Configuration")
  
  objConfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.gmail.com"
  objConfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 587
  objConfig.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing")    = 2
  objConfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
  objConfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpusessl")      = false 
  objConfig.Fields("http://schemas.microsoft.com/cdo/configuration/sendusername")    = "xx@gmail.com"
  objConfig.Fields("http://schemas.microsoft.com/cdo/configuration/sendpassword")    = "xx"
  objConfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
  
  objConfig.Fields.Update
  
  Set objMail.Configuration = objConfig
  
  objMail.From     = "xx@gmail.com"
  objMail.To       = "yy@yahoo.com"
  
  objMail.Subject  = "Test EMAIL"
  objMail.TextBody = "Test EMAIL"
  objMail.HTMLBody = "fffffffffff"
  
  objMail.Send
  Set objMail = Nothing
  </code></pre>