Expand my Community achievements bar.

Error while sending email using ACS Commons EmailService

Avatar

Level 2

We are sending out emails using com.adobe.acs.commons.email.EmailService from AEM. Some times it working fine but some times I can see AuthenticationFailureException.

If my config is not proper I should see the same error always. But it's working fine some time and some times it's throwing below error

 

Error:

javax.mail.AuthenticationFailedException: 535 5.7.3 Authentication unsuccessful

 

Till now we were using adobe's SMTP details but now we are working on updating it to our own SMTP server. I see this issues as part of that update.

 

Any help on this is greatly appreciated..

9 Replies

Avatar

Level 6

Looks like some issue with the SMTP settings. Try changing smtp port. I have seen intermittent issues due to SMTP configs.

Check out this link if you haven't checked already:

https://stackoverflow.com/questions/52010211/javax-mail-authenticationfailedexception-535-5-7-3-cann...

Avatar

Level 2
We are using port 25 as specified in the post. It's working fine some times... If it's not working at all then I would have gone to outlook admins and ask them to check the account

Avatar

Community Advisor

Hi @kgiribabu ,

 

These mails which you are sending, these are from author server or publish server or dispatcher? Reason being, if you have multiple instance behind dispatcher and may be the SMTP configuration is missing/wrong in one of them. Also, is it just happening on one instance? Can you replicate it on lower instance (say dev), where you can put more logs (may be logging masked credentials) so that you can validate its not related to wrong configuration/run-modes being picked.

Avatar

Employee Advisor

Hi @kgiribabu ,

 

please check if you have the same SMTP config on all the publisher.


Thanks 

Avatar

Level 9

Hi,

535 Authentication failed could occur due to many reasons. Some of them like username password incorrect, smtp user is disabled or smtp server authentication turn off etc etc. If you are sure about each instance of your email client has accurate smtp config then check with SMTP mail server. They will have logs and can help you with real root cause of it. But make sure your email service instances r verified first.

Avatar

Community Advisor

Hi @kgiribabu,

 

The best way to debug this issue is to check if the AEM server is having any network blockers to connect to the SMTP server. Please check with the network admin and try whitelisting the SMTP server. This will resolve the issue.

 

Thanks,

Kiran Vedantam.

Avatar

Level 2
Thanks Kiran. Our Adobe CSE has done that work. Whitelisted our SMTP IP addresses in AEM server.