title: Using SMTP, Gmail, and STARTTLS
body: <p>So I'm learning about SMTP and am trying to use <code>telnet</code> to send some mail over SMTP.</p>
  
  <p>I've easilly been able to send mail <strong>to</strong> my gmail account via:</p>
  
  <pre><code>$ host gmail.com
  ...
  gmail.com mail is handled by 5 gmail-smtp-in.l.google.com.
  ...
  $ telnet gmail-smtp-in.l.google.com 25
  Trying 74.125.142.27...
  ...
  Connected to gmail-smtp-in.l.google.com.
  ...
  HELO &lt;me@test.com&gt;
  ...
  </code></pre>
  
  <p>However, I'm having trouble sending <strong>from</strong> my gmail account. From what I understand about SMTP, I should be using SMTP to send mail from &lt; mygmailaddress@gmail.com >
   to the outgoing gmail SMTP servers, which in turn use SMTP to transfer the mail to the receivers incoming SMTP server ect. </p>
  
  <p>However, I'm having difficulties. If I <code>telnet</code> into <code>smtp.gmail.com</code> via port <code>465</code> (gmail outgoing smtp mail server canonical), I'm immediately disconnected after starting with <code>HELO &lt;blah@blah.com&gt;</code>, or asked to <code>STARTTLS</code>. I can't find answers on how to proceed. </p>
  
  <p>Any help is appreciated. </p>
  
  <p>Sidenote: Currently I'm using Starbucks free Wi-Fi to access the internet. I'm actually unable to <code>telnet</code> directly from my computer (No route to host error). Instead, it only works if I <code>ssh</code> into a remote linux box on my school's network first, then <code>telnet</code> from there. Any idea why this is? </p>
  
  <p>Thanks!</p>