I'm trying to send mails using my java app and gmail. Here is my config:
mail:
host: smtp.gmail.com
username: mail@gmail.com
password: password
port: 465
protocol: smtps
But, unfortunately I'm getting following error:
javax.mail.AuthenticationFailedException: 535-5.7.8 Username and Password not accepted. Learn more at
535 5.7.8 https://support.google.com/mail/?p=BadCredentials l18-20020a056402345200b0043a5004e714sm3019845edc.64 - gsmtp
at com.sun.mail.smtp.SMTPTransport$Authenticator.authenticate(SMTPTransport.java:947)
at com.sun.mail.smtp.SMTPTransport.authenticate(SMTPTransport.java:858)
I have enabled access to less secured apps on my gmail account and I'm sure that provided username and password are valid.
Can someone help me with this?
Thanks


