title: UserMailer with Devise
body: <p>am using my custom mailer UserMailer to send emails. It works perfect in development, but in production i get error 500, that is when am trying to retrieve my password on forgetting. </p>
  
  <p>here is what is in the production logs in the production mode</p>
  
  <pre><code>  Processing by Devise::PasswordsController#create as HTML
    Parameters: {"utf8"=&gt;"✓","authenticity_token"=&gt;"xxxxxxxxxxxxxxx", "user"=&gt;{"email"=&gt;"sam@gmail.com"}, "commit"=&gt;"Send me r$
   Completed 500 Internal Server Error in 2ms
  
   NameError (uninitialized constant Devise::UserMailer):
    activesupport (3.2.8) lib/active_support/inflector/methods.rb:230:in `block in  constantize'
  activesupport (3.2.8) lib/active_support/inflector/methods.rb:229:in `each'
  activesupport (3.2.8) lib/active_support/inflector/methods.rb:229:in `constantize'
  devise (2.1.2) lib/devise.rb:256:in `get'
  devise (2.1.2) lib/devise.rb:279:in `mailer'
  </code></pre>
  
  <p>my mailer configuration. user_mailer.rb</p>
  
  <pre><code> class UserMailer &lt; Devise::Mailer 
  
    default :from =&gt; "info@xxxxxxxx.com"  
  
   def signup_confirmation(user)
     @user = user
     mail :to =&gt; user.email, :subject=&gt; "Thank you for signing with us"
  end
  
  # send password reset instructions
  
  def reset_password_instructions(user)
    @resource = user
    mail(:to =&gt; @resource.email, :subject =&gt; "Reset password instructions", :tag =&gt; 'password-reset', :content_type =&gt; "text/html") do |format|
     format.html { render "devise/mailer/reset_password_instructions" }
    end
  end  
  end
  </code></pre>
  
  <p>production.rb file</p>
  
  <pre><code>config.action_mailer.default_url_options = { :host =&gt; 'https://xxxxxxxxxx.com'  }
  
  config.action_mailer.raise_delivery_errors = false
  
   config.action_mailer.perform_deliveries = true
  
  
     config.action_mailer.delivery_method = :smtp
     config.action_mailer.smtp_settings = {
        :address              =&gt; "smtp.gmail.com",
        :port                 =&gt; 587,
        :domain               =&gt; 'info@xxxxxxxx.com',
        :user_name            =&gt; 'yyyyyy',
        :password             =&gt; 'zzzzzzzz',
        :authentication       =&gt; 'plain',
        :openssl_verify_mode =&gt; 'none',
       :enable_starttls_auto =&gt; true  
  
      }
  </code></pre>
  
  <p>your assistance will be highly appreciated</p>