2011-12-16 15 views
1

私は開発モードでアプリケーションを実行するとメールを送信しますが、プロダクションモードではメールを送信しないため、エラーは表示されません。その他パスワードを忘れたはメールを送信しています。devise_invitableプロダクションモードでメールを送信しない

私はセットアップ私も環境にproduction.rbでこれを設定するが、それでも私はレール3

を使用しています:( を働いていない試みた初期化子

ActionMailer::Base.smtp_settings = { 


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

}

でsetup.rbをを持っています

答えて

2

実稼働環境用のアクションメーラーでの配信を有効にしてください。 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' } 
+0

他のすべてのメールはdevise_invite以外の運用モードになります – anand

+0

また、運用ログにエラーは表示されません! – anand

+0

それは働いた!おかげで多くの仲間:D – anand

関連する問題