ninjaframework / ninja

Ninja is a full stack web framework for Java. Rock solid, fast and super productive.
http://www.ninjaframework.org
Apache License 2.0
1.91k stars 518 forks source link

Can't send e-mail with Gmail account #469

Closed yuripourre closed 8 years ago

yuripourre commented 8 years ago

I followed the Send Mail Tutorial.

But I got an Exception:

default Postoffice implementation class ninja.postoffice.commonsmail.PostofficeCommonsmailImpl
...
org.apache.commons.mail.EmailException: Sending the email to the following server failed : smtp.gmail.com:465
...
Caused by: javax.mail.AuthenticationFailedException: <https://accounts.google.com/ContinueSignIn?sarp=1&scc=1&plt=AKgnsbv9Syj-hBKCJKHwb7cvAfOuYnw4TqLzttPh4fgOOI93qxvLPbGpT0dVN3XvqjrZYfitotx-NF8ivz6aU1F96EZxDcXiuKxgI8ewiMVcYBwKPNXSY1hW_QtkYRzA> Please log in via your web browser and then try again.
Learn more at
https://support.google.com/mail/answer/78754

Then I received a Google e-mail saying something like (translated):

Someone tried to login in your Google Account *myemail@gmail.com* with and app the does not meet the modern security standards.
...

Any hints?

raphaelbauer commented 8 years ago

Did you click on the link that logged you into your account? It's a security mechanism from Google and you have to confirm that way that it is a valid login... It will work then.. Cheers, Raphael

On Fri, Feb 19, 2016 at 4:57 PM, Yuri Pourre notifications@github.com wrote:

I followed the Send Mail Tutorial http://www.ninjaframework.org/documentation/sending_mail.html.

But I got an Exception:

... Caused by: javax.mail.AuthenticationFailedException: https://accounts.google.com/ContinueSignIn?sarp=1&scc=1&plt=AKgnsbv9Syj-hBKCJKHwb7cvAfOuYnw4TqLzttPh4fgOOI93qxvLPbGpT0dVN3XvqjrZYfitotx-NF8ivz6aU1F96EZxDcXiuKxgI8ewiMVcYBwKPNXSY1hW_QtkYRzA Please log in via your web browser and then try again. Learn more athttps://support.google.com/mail/answer/78754 d62sm4920235qka.3

Then I received a Google e-mail saying something like (translated):

Someone tried to login in your Google Account myemail@gmail.com with and app the does not meet the modern security standards. ...

Any hints?

— Reply to this email directly or view it on GitHub https://github.com/ninjaframework/ninja/issues/469.

yuripourre commented 8 years ago

Thank you for the fast reply.

Yes, I solved it, as pointed in the link by google, changing my account to a less secure one.

https://www.google.com/settings/security/lesssecureapps

I am enjoying the framework by the way. :smile:

raphaelbauer commented 8 years ago

:+1: Perfect!