Answer the question
In order to leave comments, you need to log in
Why does Net::SMTPAuthenticationError occur?
Hello Toaster!
I'm trying to send an email via Rails, but I'm getting an error:
Net::SMTPAuthenticationError (534-5.7.14 <https://accounts.google.com/ContinueSignIn?sarp=1&scc=1&plt=AKgnsbvm6
):
app/controllers/pages_controller.rb:11:in `send_email'
def send_email
@client = Client.new(user_params)
if @client.save
AppMailer.welcome_email(@client).deliver
end
end
config.action_mailer.delivery_method = :smtp
config.action_mailer.raise_delivery_errors = true
ActionMailer::Base.smtp_settings = {
:address => 'smtp.gmail.com',
:domain => 'gmail.com',
:port => 587,
:user_name => 'мой_майл@gmail.com',
:password => 'пароль',
:authentication => :plain,
:enable_starttls_auto => true
}
Sent mail to Куда@mail.ru (1407.7ms)
Date: Sat, 11 Oct 2014 21:10:53 +0400
From: Откуда@gmail.com
To: Куда@mail.ru
Message-ID: <[email protected]>
Subject: =?UTF-8?Q?=D0=97=D0=B0=D0=BA=D0=B0=D0=B7_45?=
Mime-Version: 1.0
Content-Type: text/html;
charset=UTF-8
Content-Transfer-Encoding: base64
Answer the question
In order to leave comments, you need to log in
It looks like gmail saw some suspicious activity in this submission of yours.
Login to your gmail account. If I'm right, then he will ask you, they say, someone here tried to spam on your behalf, was it you or not?
You may need to change your security settings https://www.google.com/settings/security/lesssecureapps
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question