LoginSignup
3
4

More than 3 years have passed since last update.

Devise + Gmail で認証メールを送信する

Last updated at Posted at 2015-06-30

1)アプリケーションに以下の記載を追加

config/initializers/devise.rb
  config.mailer_sender = 'hogehoge@gmail.com'
config/enviroments/production.rb
ActionMailer::Base.smtp_settings = {
  address: 'smtp.gmail.com',
  port: 587,
  user_name: 'hogehoge@gmail.com',
  password: 'password',
  authentication: 'plain',
  enable_starttls_auto: true
}

2)googleから「不正なログインがブロックされました」のメールが来た場合は本文中の以下より、トラブルシューティングを行う

このログインがご自身によるもので、アクセスできない場合は、http://support.google.com/mail?p=client_login でトラブルシューティングの手順を行ってください。 
3
4
1

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
3
4