deviseを使用して、レール4の動的電子メールサーバーの設定でパスワードをリセットしようとしています。Errno :: ECONNREFUSED - 接続が拒否されました - "localhost"ポート25のconnect(2):
my_mailer.rb
class MyMailer < Devise::Mailer
helper :application
include Devise::Controllers::UrlHelpers
default template_path: 'devise/mailer'
def reset_password_instructions(record, token, opts={})
# Has been dynamically set in the mailer_set_url_options of application_controller.rb
# opts[:host] = Setup.email_url
opts[:address] = Setup.email_address
opts[:port] = Setup.email_port
opts[:domain] = Setup.email_domain
opts[:from] = Setup.email_username
super
end
end
しかし、同じエラーを取得して、問題になる可能性がありますどのようなすべてのヘルプは本当に参考になりますありがとうございました:)
は、私はちょうどそれに見ているスクリーンショットを追加ここ –
@RajarshiDasをお使いのSMTP設定を投稿役立つかもしれない願っています。実際には何かが乱れてしまいました。 –
あなたはhttp://guides.rubyonrails.org/action_mailer_basics.html#action-mailer-configuration-for-gmailのような環境smtp設定を投稿する必要があります –