anand
anand

Reputation: 518

devise_invitable not sending mails in production mode

I am using devise_invitable to invite users, it is sending mails when i run the app in development mode, but in production mode it is not sending mails, also showing no errors. Other forgot password is sending mails.

i have setup a setup.rb in initializers

ActionMailer::Base.smtp_settings = {


:address              => "smtp.gmail.com",
  :port                 => 587,
  :domain               => 'mydomain',
  :user_name            => '[email protected]',
  :password             => 'secret',
  :authentication       => 'plain',
  :enable_starttls_auto => true 

}

I tried setting this in production.rb in environments also but still not working :( i am using rails 3

Upvotes: 1

Views: 806

Answers (1)

Alexey
Alexey

Reputation: 692

Try to enable delivering in action mailer for production environment: config/environments/production.rb

  config.action_mailer.perform_deliveries = true
  config.action_mailer.delivery_method = :smtp
  config.action_mailer.raise_delivery_errors = true
  config.action_mailer.default_url_options = { :host => 'yoursite.com' }

Upvotes: 2

Related Questions