title: Rails 3 ActionMailer error - hostname was not match with the server certificate
body: <p>I am setting up SMTP for my Rails 3 App. </p>
  
  <p>This configuration works.</p>
  
  <pre><code>ActionMailer::Base.delivery_method = :smtp
  ActionMailer::Base.smtp_settings = {  
    :address              =&gt; "smtp.gmail.com",  
    :port                 =&gt; 587,  
    :domain               =&gt; "mydomain.com",  
    :user_name            =&gt; "&lt;username&gt;",  
    :password             =&gt; "&lt;password&gt;",  
    :authentication       =&gt; "plain",  
    :enable_starttls_auto =&gt; true  
  }
  </code></pre>
  
  <p>But this configuration doesn't.
  It gives "hostname was not match with the server certificate"</p>
  
  <pre><code>ActionMailer::Base.delivery_method = :smtp
  ActionMailer::Base.smtp_settings = {  
    :address              =&gt; "some_other_server.com",  
    :port                 =&gt; 587,  
    :domain               =&gt; "mydomain.com",  
    :user_name            =&gt; "&lt;username&gt;",  
    :password             =&gt; "&lt;password&gt;",  
    :authentication       =&gt; "plain",  
    :enable_starttls_auto =&gt; true  
  }
  </code></pre>
  
  <p>Strangely, the same configuration works in Rails 2.3.8. (:tls => true)</p>
  
  <p>What's wrong?</p>