Scenario – You are using a mail adapter in SAP CPI artifact / iflow and getting below error.
Error – javax.mail.AuthenticationFailedException: No authentication mechanisms supported by both server and client.
Cause – You are not using the correct authentication mechanism in Mail adapter -> Connection – > Authentication
You have used the incorrect combination in Mail Adapter ex. Encrypted User name and password. But, you are providing a plain user name and passowrd.
Resolution – If you are using a plain user name and password combination, that you have stored in Key Store. Change the Authentication to Plain User / Password. Save it and deploy again.
Result – Now the error “javax.mail.AuthenticationFailedException: No authentication mechanisms supported by both server and client” is gone. There might be another authentication combinations other than above which can cause this error. Choose the correct one.