AEMaaCS - 535 authentication failed error when sending emails using mailgun host configuration
I have a requirement to configure mailgun as my smtp host in order to share assets over an email using the Asset share common in AEMaaCS.
When I click on the share option I get th below error message.
Caused by: org.apache.commons.mail.EmailException: Sending the email to the following server failed : proxy.tunnel:30587 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) ... 234 more Caused by: javax.mail.AuthenticationFailedException: 535 Authentication failed 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) ... 236 more
Below are my configuration details.
Configuration: AdvancedNetworking

Configuration: com.day.cq.mailer.DefaultMailService.cfg.json
{
"smtp.host": "$[env:AEM_PROXY_HOST;default=proxy.tunnel]",
"smtp.port": "30587",
"smtp.user": "EMAIl_USERNAME",
"smtp.password": "$[secret:EMAIL_PASSWORD]",
"from.address": "noreply@sample.com",
"smtp.ssl": false,
"smtp.starttls": true,
"smtp.requiretls": false,
"debug.email": true,
"oauth.flow": false
}Is there anything else that I am missing, does anyone know how I can fix this issue.
Thank you in advance !