App: WSO2-IS 5.6
I am getting the following error intermittently when trying to send email on user registration/pwd reset. Retrying later for the same email account works fine. Lack of detail in error message makes it difficult to identify the root cause. Stack trace from the log is copied below.
TID: [-1] [] [2022-01-13 14:27:44,459] ERROR {org.wso2.carbon.event.output.adapter.email.EmailEventAdapter} - Event dropped at Output Adapter 'EmailPublisher' for tenant id '-1234', Error in message format, null
javax.mail.AuthenticationFailedException
at javax.mail.Service.connect(Service.java:306)
at javax.mail.Service.connect(Service.java:156)
at javax.mail.Service.connect(Service.java:105)
at javax.mail.Transport.send0(Transport.java:168)
at javax.mail.Transport.send(Transport.java:98)
at org.wso2.carbon.event.output.adapter.email.EmailEventAdapter$EmailSender.run(EmailEventAdapter.java:306)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Thanks.
CodePudding user response:
this error is happening because the WSO2IS cannot connect with the email publisher you are using. To fix this.
- Stop the IS server
- Go to <IS_HOME>/repository/conf/axis2/axis2.xml
- Check if the configurations are in place correctly
<transportSender name="mailto"
>
<parameter name="mail.smtp.from">{SENDER'S_EMAIL_ID}</parameter>
<parameter name="mail.smtp.user">{USERNAME}</parameter>
<parameter name="mail.smtp.password">{PASSWORD}</parameter>
<parameter name="mail.smtp.host">smtp.gmail.com</parameter>
<parameter name="mail.smtp.port">587</parameter>
<parameter name="mail.smtp.starttls.enable">true</parameter>
<parameter name="mail.smtp.auth">true</parameter>
</transportSender>
(If you are using a Gmail account you have to "Allow less secure apps" in your account.)
4. Restart IS server.
To check email and passwords are correct you can use the username and password here to connect with the email publisher. For more details please check the below documentation
CodePudding user response:
This error occurs when an outsider blocks Gmail from signing in to the account. Enabling 'Low Security Application Access' at https://myaccount.google.com/security will solve this problem.
