title: Getting Devise 1.3.4 to send emails with Gmail in development
body: <p>I'm trying to setup devise 1.3.4 to send emails via gmail while in development mode. I should mention that I'm using Rails 3.0.4 and Ruby 1.9.2p136.</p>
  
  <p>I've tried the following in config/environments/development.rb:</p>
  
  <pre><code>config.action_mailer.raise_delivery_errors = true
  config.action_mailer.perform_deliveries = true
  
  config.action_mailer.default_url_options = { :host =&gt; 'mydomain.com' }
  
  ActionMailer::Base.smtp_settings = {  
    :address              =&gt; "smtp.gmail.com",  
    :port                 =&gt; 587,  
    :domain               =&gt; "mydomain.com",  
    :user_name            =&gt; "info",  
    :password             =&gt; "secret",  
    :authentication       =&gt; "plain",  
    :enable_starttls_auto =&gt; true  
  }  
  </code></pre>
  
  <p>And in config/initializers/devise.rb I changed</p>
  
  <pre><code> config.mailer_sender = "please-change-me-at-config-initializers-devise@example.com"
  </code></pre>
  
  <p>To</p>
  
  <pre><code> config.mailer_sender = "info@mydomain.com"
  </code></pre>
  
  <p>Then I tried</p>
  
  <p><a href="http://yekmer.posterous.com/devise-gmail-smtp-configuration" rel="noreferrer">http://yekmer.posterous.com/devise-gmail-smtp-configuration</a></p>
  
  <p>It's still not working.</p>
  
  <p>Is there a wiki page on how to get the mailer working? I see the email in my log and it looks great! The links work, etc ... I just want to see them in my email account.</p>
  
  <hr>
  
  <p>Edit</p>
  
  <p>I found the answer -
  I used <a href="http://yekmer.posterous.com/devise-gmail-smtp-configuration" rel="noreferrer">http://yekmer.posterous.com/devise-gmail-smtp-configuration</a> - I had been putting that code in config/intializers/devise.rb when I should have been putting it in config/environments/development.rb.</p>