Send Email with Microsoft Account

Hello,

I am trying to send automated email using Microsoft account. We have MFA enable on our SMTP. I followed solution provided in below post (I created App password and “Authenticated SMTP” option is enabled too)but still getting error:

Error while communicating with the smtp server: javax.mail.AuthenticationFailedException
https://forum.knime.com/t/send-email-with-microsoft-outlook/29776

what should I do to make it work? Is it something SMTP related?

Logs for the same:
org.knime.core.node.InvalidSettingsException: Error while communicating with the smtp server: javax.mail.AuthenticationFailedException
at org.knime.base.node.util.sendmail.SendMailConfiguration.send(SendMailConfiguration.java:680)
at org.knime.base.node.util.sendmail.SendMailConfiguration.send(SendMailConfiguration.java:659)
at org.knime.base.node.util.sendmail.SendMailNodeModel.execute(SendMailNodeModel.java:95)
at org.knime.core.node.NodeModel.executeModel(NodeModel.java:549)
at org.knime.core.node.Node.invokeFullyNodeModelExecute(Node.java:1267)
at org.knime.core.node.Node.execute(Node.java:1041)
at org.knime.core.node.workflow.NativeNodeContainer.performExecuteNode(NativeNodeContainer.java:595)
at org.knime.core.node.exec.LocalNodeExecutionJob.mainExecute(LocalNodeExecutionJob.java:95)
at org.knime.core.node.workflow.NodeExecutionJob.internalRun(NodeExecutionJob.java:201)
at org.knime.core.node.workflow.NodeExecutionJob.run(NodeExecutionJob.java:117)
at org.knime.core.util.ThreadUtils$RunnableWithContextImpl.runWithContext(ThreadUtils.java:367)
at org.knime.core.util.ThreadUtils$RunnableWithContext.run(ThreadUtils.java:221)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at org.knime.core.util.ThreadPool$MyFuture.run(ThreadPool.java:123)
at org.knime.core.util.ThreadPool$Worker.run(ThreadPool.java:246)
Caused by: javax.mail.AuthenticationFailedException
at javax.mail.Service.connect(Service.java:319)
at javax.mail.Service.connect(Service.java:169)
at javax.mail.Service.connect(Service.java:189)
at org.knime.base.node.util.sendmail.SendMailConfiguration.sendMail(SendMailConfiguration.java:853)
at org.knime.base.node.util.sendmail.SendMailConfiguration.send(SendMailConfiguration.java:674)
… 15 more

Hi there,

Are you using the App password in the password field?

With MFA, there might be new complexities as things may have changed from the original posting, or your environment may be different. Potentially conditional access policies may be something to look into which may prevent the requirement of MFA for certain users / locations?

1 Like

Hello,
Yes, I tried using both App password and my password. It fails in both cases.

I’d recommend speaking with your IT team to test out conditional access policies in that case, to see if possible MFA is preventing email from working. There may be other admin side settings which need review (on the Microsoft/Azure) side of things which may prevent this from working.

1 Like

Yes I am scheduling that meeting soon. I suspect any requests coming from KNIME are getting blocked on SMTP server.
Thank you for your post. It was very informative. I will post here if I am able to get it work.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.