title: why is authentication: 'plain' the default setting for actionmailer in rails (with gmail smtp)?
body: <p>I am reading up on actionmailer for rails. My question is about the default settings as described <a href="http://guides.rubyonrails.org/action_mailer_basics.html#action-mailer-configuration-for-gmail" rel="noreferrer">here</a>:</p>
  
  <pre><code>config.action_mailer.delivery_method = :smtp
  config.action_mailer.smtp_settings = {
    :address              =&gt; "smtp.gmail.com",
    :port                 =&gt; 587,
    :domain               =&gt; 'baci.lindsaar.net',
    :user_name            =&gt; '&lt;username&gt;',
    :password             =&gt; '&lt;password&gt;',
    :authentication       =&gt; 'plain',
    :enable_starttls_auto =&gt; true  }
  </code></pre>
  
  <p>now reading from the API <a href="http://api.rubyonrails.org/classes/ActionMailer/Base.html" rel="noreferrer">here</a> it says that: </p>
  
  <p>":authentication - If your mail server requires authentication, you need to specify the authentication type here. This is a symbol and one of :plain (will send the password in the clear)"</p>
  
  <p>so my question is, does this send the password as plaintext? I find it hard to believe that it does but I can't see in the documentation where it says it encrypts it, is it something to do with the line: <code>:enable_starttls_auto =&gt; true</code> ? let me know where my mistake is, also how does the enablestarttls guarantee a secure connection (if this is where the encryption comes in)?</p>
  
  <p>as always links to documentation/references are appreciated and encouraged :)</p>
  
  <p>thanks in advance.</p>