title: 5.7.0 Must issue a STARTTLS command first
body: <p>I'm trying to send email through C#. Although I beleive I've done everything right, it still throws this exception : </p>
  
  <p><strong>"The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.5.1 Authentication Required. Learn more at"</strong></p>
  
  <p>At first I thought, it could be a zone/ip/region problem... But when i logged into gmail, there wasn't any warning of that. And to be sure, i've uploaded a file to a website to check from there, still the error was thrown.</p>
  
  <p>Than I've tried changing the port to 465. It didn't work either.</p>
  
  <p>I've first tried with accounts that are managed by a Google Apps account. So I thought it could be it, but it wasn't either...</p>
  
  <p>I'm truly out of ideas right now. </p>
  
  <p>Any of you have an idea ?</p>
  
  <p>Here is the example code :</p>
  
  <pre><code>   SmtpClient sm = new SmtpClient("smtp.gmail.com",587);
  
          sm.Credentials = new NetworkCredential("blabla@gmail.com","**");
          sm.UseDefaultCredentials = false;
          sm.EnableSsl = true;
          sm.DeliveryMethod = SmtpDeliveryMethod.Network;
          sm.Send("blabla@gmail.com","blabla2@tr3reklam.com","Test","Test");
  </code></pre>
  
  <p>** Note **
  I've checked the account name and password, they both are right.</p>