I have an app , it uses devise to send confirmation mails for the newly registered users , I have smtp settings under 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 => "[email protected]",
:password => "mygmail password"
}
This is throwing me with an error like ,
Net::SMTPAuthenticationError in Devise::RegistrationsController#create
535-5.7.1 Please log in with your web browser and then try again. Learn more at
Any Ideas how to resolve this ?
Resolved using 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 => "[email protected]",
:password => 'my_gmail password',
:authentication => "plain",
:enable_starttls_auto => true
}
I was unuable to resolve this problem with any code. After a while i logged in to gmail account and this is, what it gave me after.
We've detected suspicious activity on your Google Account. Please create a new password to continue using your account.
Read some tips on creating a secure password.
So solution to this problem is simply log into account you use for email sending and reconfirm your new password
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With