LoginSignup
0
0

More than 3 years have passed since last update.

【Railsアプリ、AWS、SendGrid】550 Unauthenticated senders not allowed

Posted at

RailsアプリをAWSにあげたらSendGridのメールが送れなくて困った。
レイルズチュートリアルの11章の設定を参考にしたままだった模様。

なので、基本設定はこちらを参考にした。
https://sendgrid.kke.co.jp/docs/Integrate/Frameworks/rubyonrails.html

※ユーザーネームとパスワードはenvファイルを使うこと。
こんな感じ。

ENV['SENDGRID_USERNAME']
ENV['SENDGRID_PASSWORD']

で、修正したのに以下のエラーが消えない

550 Unauthenticated senders not allowed

なんで??と悩むこと1週間ほど。結論を書きます。
①インスタンスを再起動
②nginxを再起動
③Unicornを再起動
②と③は以下を参考にした。
https://qiita.com/naoki_mochizuki/items/5a1757d222806cbe0cd1#%E7%A2%BA%E8%AA%8D

EC2サーバーとWEBサーバーとアプリケーションサーバーの3つを再起動する必要があった。
初歩的だけど見落としていた。

https___qiita-image-store.s3.amazonaws.com_0_91664_962e67f6-6c3e-d441-10fb-24c37aaa7dfc.png

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0