Created
October 22, 2015 09:22
-
-
Save YumaInaura/d46c4a5ba7d738291078 to your computer and use it in GitHub Desktop.
Gmail 経由での SMTP メール送信が出来ない時の解決法 (ユーザー名とパスワードは合っているのに。。) ref: http://qiita.com/Yinaura/items/6886682a607951a71bac
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
config.action_mailer.raise_delivery_errors = true | |
config.action_mailer.default_url_options = { :host => 'localhost:3000' } | |
config.action_mailer.delivery_method = :smtp | |
config.action_mailer.smtp_settings = { | |
:address => 'smtp.gmail.com', | |
:port => 587, | |
:domain => 'example.com', | |
:user_name => '[email protected]', | |
:password => 'dlapwoeifkbmzksl', # Googleが発行する、12桁のアプリケーションパスワード | |
:authentication => :login, | |
:enable_starttls_auto => true | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UserMailer.registration_confirmation.deliver_now |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Net::SMTPAuthenticationError: 535-5.7.8 Username and Password not accepted. Learn more at | |
from /Users/yinaura/.rbenv/versions/2.2.3/lib/ruby/2.2.0/net/smtp.rb:976:in `check_auth_response' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- :user_name => '[email protected]', # gmail アドレスじゃないので使えない | |
+ :user_name => '[email protected]', # gmail アドレスなので使える |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment