0
私はRailsアプリケーションでアカウントを作成する新規ユーザーにアカウント確認メールを送信しようとしています。アクションSendgridとHerokuを使ってデプロイしたときにMailer production.rbが動作しない
私は正常にdevelopment.rb経由でローカルにデプロイしましたが、何らかの理由で「申し訳ありませんが、何か問題が発生しました」というエラーメッセージが毎回表示されます。 。 Stack OverflowとHeroku、Youtubeの両方のリソースを見直し、解決策を見つけることができませんでした。ここで
は、環境/ production.rbで私のコードです:再び
# Don't care if the mailer can't send.
config.action_mailer.raise_delivery_errors = true
config.action_mailer.perform_deliveries = true
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
address: "smtp.sendgrid.net",
port: 587,
domain: ENV["SENDGRID_DOMAIN"],
authentication: "plain",
enable_starttls_auto: true,
user_name: ENV["SENDGRID_USERNAME"],
password: ENV["SENDGRID_PASSWORD"]
}
config.action_mailer.default_url_options = {:host => "<myherokuappname>.herokuapp.com/"}
config.action_mailer.perform_caching = false
だけで確認する、私だけではない、生産レベルでは、ローカルにメールを展開することができますよ。どんなヒントも大歓迎です。