Does anyone have a clear process guide for setting up the Send Email node to work with Microsoft? This needs to work both the KNIME Analytics Platform and KNIME Server. All Microsoft’s documentation online is out of date and does not reflect the current screens or processes. For gmail, to work on Server required the setup of 2-step verification and an app password (javax.mail.AuthenticationFailedException - Send email issue on Server), Microsoft has a more complicated process. Any help is appreciated!
Hi @supersharp,
Could you please elaborate on what you have tried already?
If you are using an office365 hosted email service it should work with this settings:
Server: smtp.office365.com
Port: 587
Encryption: STARTTLS
In addition you have to use the credentials for the account.
Source:
I have successfully tried this out 2 days ago with a customer. Note: There was no 2 factor authorization configured, I have to check how to achieve sending mails with activated 2FA.
Best,
Michael
Hi @MichaelRespondek - we tried several combinations of the server, port, encrpytion etc. on our enterprise O365 setup. We also were unable to get an app password created, as the Microsoft documents do not match the current Admin center. We don’t have 2 factor authentication either - though some staff are having to log in with a phone code. Any other ideas you think we should test out? Thanks!
@MichaelRespondek - see below for the setup we tried. This is now on multi-factor authentication, and using an App Password generated by Azure Active Directory. Any suggestions on other things we can try?
Error:
ERROR Send Email 3:1 Execute failed: Error while communicating with the smtp server: javax.mail.AuthenticationFailedException
Log:
2021-01-22 12:41:47,628 : ERROR : KNIME-Worker-12-Send Email 3:1 : : Node : Send Email : 3:1 : Execute failed: Error while communicating with the smtp server: javax.mail.AuthenticationFailedException
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:737)
at org.knime.base.node.util.sendmail.SendMailNodeModel.execute(SendMailNodeModel.java:95)
at org.knime.core.node.NodeModel.executeModel(NodeModel.java:576)
at org.knime.core.node.Node.invokeFullyNodeModelExecute(Node.java:1245)
at org.knime.core.node.Node.execute(Node.java:1025)
at org.knime.core.node.workflow.NativeNodeContainer.performExecuteNode(NativeNodeContainer.java:558)
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:334)
at org.knime.core.util.ThreadUtils$RunnableWithContext.run(ThreadUtils.java:210)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
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.send(SendMailConfiguration.java:726)
… 14 more
Thanks!
@supersharp I am sorry, I tried to find some additional guides regarding the 2FA problematic and I only found one guide by Microsoft, maybe this could help you:
There are 3 different ways described to get a smtp setup achieved, the second option could be useful for you but it is limited to internal recipients.
Hi there @MichaelRespondek
I figured out the Microsoft MFA setup in KNIME and excited to share on the Forum so it might be useful for others. I tried with sending an email internally and externally, from KNIME Analytics Platform and the KNIME Server, and worked in all cases!
- Visit the Microsoft site here which gives instructions - each situation may be different and ours worked with the ‘Additional Security Verification Page’:
- How to manage app passwords - Azure Active Directory | Microsoft Docs
- https://account.activedirectory.windowsazure.com/Proofup.aspx
- If you are not able to see app passwords, your Microsoft Admin will need to enable this functionality in Azure AD or elsewhere
-
Save the app password somewhere, as it is not shown again after creation.
-
Set up a KNIME ‘Send Email’ node and configure as follows.
Note, the password here is the app password - not the regular user password.
-
Start sending automated emails from KNIME using Office365, even with MFA!
Cheers!
Hi @supersharp,
Thanks for sharing your solution, good to hear that you finally got it configured properly.
Cheers,
Michael
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.