I have an application, it uses the application to send confirmation letters to newly registered users, I have smtp parameters in the development.rb file as
config.action_mailer.default_url_options = { :host => 'http://localhost:3000' }
config.action_mailer.raise_delivery_errors = true
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
:enable_starttls_auto => true,
:address => "smtp.gmail.com",
:port => 587,
:domain => "gmail.com",
:authentication => :login,
:user_name => "my_username@gmail.com",
:password => "mygmail password"
}
It throws me a mistake like
Net::SMTPAuthenticationError in Devise::RegistrationsController
535-5.7.1 Please log in with your web browser and then try again. Learn more at
Any ideas how to solve this problem?
Allowed to use these settings ..
config.action_mailer.default_url_options = { :host => 'localhost:3000' }
config.action_mailer.perform_deliveries = true
config.action_mailer.default :charset => "utf-8"
ActionMailer::Base.smtp_settings = {
:address => "smtp.gmail.com",
:port => 587,
:user_name => "my_username@gmail.com",
:password => 'my_gmail password',
:authentication => "plain",
:enable_starttls_auto => true
}
source
share