SMTP Configuration
Hi Team,
We have SMTP configured in our AEM environment and we are using gmail smtp server for sending emails. We have the below configuration
smtp.host="smtp.gmail.com"
smtp.ssl="{Boolean}true"
smtp.starttls="{Boolean}false"
debug.email="{Boolean}false"
smtp.port="465"
smtp.user="xyz@gmail.com"
smtp.password="password"
from.address="xyz@gmail.com"
When we are performing the below options for assets - like download asset

and share link

from our AEM environment we are receiving error as
Caused by: org.apache.commons.mail.EmailException: Sending the email to the following server failed : smtp.gmail.com:465
at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1469)
at org.apache.commons.mail.Email.send(Email.java:1496)
at com.day.cq.mailer.impl.DefaultMailService.send(DefaultMailService.java:331)
... 11 more
Caused by: 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 j1-20020a170902c3c100b001891ea4d133sm5479329plj.12 - gsmtp
at com.sun.mail.smtp.SMTPTransport$Authenticator.authenticate(SMTPTransport.java:965)
at com.sun.mail.smtp.SMTPTransport.authenticate(SMTPTransport.java:876)
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:780)
at javax.mail.Service.connect(Service.java:388)
at javax.mail.Service.connect(Service.java:246)
at javax.mail.Service.connect(Service.java:195)
at javax.mail.Transport.send0(Transport.java:254)
at javax.mail.Transport.send(Transport.java:124)
at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1459)
... 13 more
But we are able to login the configured user Gmail account and able to see inbox as well. When i tried to enable secure apps i am not seeing the option for my Gmail account.

Any solution/ pointers for this issue to be fixed.
Thanks,



