###前提・実現したいこと
Railsにてユーザ認証用のリンクをメール送信したいです。
ユーザ認証にはdeviseを使用しており、送信元のメールアドレスはG Suiteで取得した独自ドメインです。
###発生している問題・エラーメッセージ
ユーザ登録時に認証用のリンクをメール送信しますが、下記エラーメッセージが表示されます。
Untrusted TLS connection established to gmail-smtp-in.l.google.com Our system has detected 550-5.7.1 that this message is likely unsolicited mail. To reduce the amount of 550-5.7.1 spam sent to Gmail, this message has been blocked.
###該当のソースコード
Ruby
1# config/environments/production.rb 2config.action_mailer.raise_delivery_errors = true 3config.action_mailer.default_url_options = { host: 'ホスト名', protocol: 'https' } 4config.action_mailer.delivery_method = :smtp 5config.action_mailer.smtp_settings = { 6 address: 'smtp.gmail.com', 7 enable_starttls_auto: true, 8 port: 587, 9 domain: 'smtp.gmail.com', 10 authentication: 'plain', 11 user_name: '送信元メールアドレス', 12 password: 'パスワード' 13}
あなたの回答
tips
プレビュー