title: Reading email (from gmail) in emacs 24
body: <p>What's the current authoritative way to check and send email in emacs 24?</p>
  
  <p>I've checked the following SO links:</p>
  
  <ol>
  <li><a href="https://stackoverflow.com/questions/6008917/setup-for-gmail-in-emacs-vm">Setup for Gmail in Emacs VM</a></li>
  <li><a href="https://superuser.com/questions/476714/how-to-configure-emacs-smtp-for-using-a-secure-server-gmail">https://superuser.com/questions/476714/how-to-configure-emacs-smtp-for-using-a-secure-server-gmail</a></li>
  <li><a href="https://stackoverflow.com/questions/12326382/which-emacs-mail-package-should-i-use?rq=1">Which Emacs mail package should I use?</a></li>
  </ol>
  
  <p>And understand the packages <a href="http://www.gnu.org/software/emacs/manual/html_node/smtpmail/Emacs-Speaks-SMTP.html#Emacs-Speaks-SMTP" rel="noreferrer">smtpmail</a>, <a href="http://www.gnu.org/software/emacs/manual/html_node/emacs/Rmail-Basics.html#Rmail-Basics" rel="noreferrer">rmail</a>, are involved, as well as an <a href="http://www.gnu.org/software/emacs/manual/html_node/smtpmail/Authentication.html" rel="noreferrer">.authinfo file</a>.</p>
  
  <p>I have created an .authinfo file of the form:</p>
  
  <p><code>
  machine mail.example.org port 25 login myuser password mypassword
  </code></p>
  
  <p>And have added the following to my <code>init.el</code> file:</p>
  
  <pre class="lang-lisp prettyprint-override"><code>(setq smtpmail-stream-type 'ssl)
  (setq smtpmail-smtp-server "smtp.gmail.com")
  (setq smtpmail-smtp-service 465)
  </code></pre>
  
  <p>(As the second link, the Superuser one, said.)</p>
  
  <p>But when I run <code>M-x rmail</code>, it still connects to my computer's local email address, rather than my gmail.  What do I need to set up to login and read/write email?  (If you could include keystrokes, that would also be super helpful.)</p>
  
  <p>I'm running ubuntu 12.04 if that makes any difference.</p>