title: Sending mail with Rails 3 in development environment
body: <p>I'm sure this has been asked a million times before but I can't find anything that works for me so I'm asking again!</p>
  
  <p>I just need a way of sending emails using ActionMailer in rails 3.  I have followed numerous tutorials including the Railscasts tutorial on the new ActionMailer and I can see the mails being generated but I don't receive them.</p>
  
  <p>I have tried a bunch of different ways but they generally amount to configuring the following settings</p>
  
  <pre><code>ActionMailer::Base.delivery_method = :smtp
  
  ActionMailer::Base.smtp_settings = {
    :address              =&gt; "smtp.gmail.com",
    :port                 =&gt; "587",
    :domain               =&gt; "gmail.com",
    :user_name            =&gt; "xxx@gmail.com",
    :password             =&gt; "yyy",
    :authentication       =&gt; "plain",
    :enable_starttls_auto =&gt; true
  }
  </code></pre>
  
  <p>I have tried the above code (with valid gmail details of course) in my config/environment.rb, config/environments/development.rb and currently have it in its own initialiser config/initialisers/setup_mail.rb</p>
  
  <p>I have also tried with a few different smtp servers including Gmail and Sendgrid, adjusting the smtp settings accordingly but still nothing.  I can see the mail in the terminal and the development log and that's it.</p>
  
  <p>Does anyone know of any other gotcha's that I may have missed that need to be setup for ActionMailer to work?  Failing that is there a way of getting more information about why the mails aren't being sent? I have </p>
  
  <pre><code>config.action_mailer.raise_delivery_errors = true
  </code></pre>
  
  <p>set in my config/development.rb but the development log still just shows the same as I see in the terminal.</p>
  
  <p>For what it's worth, I am developing on a Ubuntu 10.04 laptop just in case there's any specific setup needed for that.</p>
  
  <p>Many thanks</p>