V4 cloud and office 365 mail server

0
Unfortunately in the V4 cloud you can not use the Mendix mail server so I have to configurate another mail server. I am having problems using the office 365 mail server of the client. It keeps telling me that the authentication is wrong, but using the same credentials in outlook does work so I am a bit stuck here. I have seen this post but that did not help. Tried all kinds of combinations but the result is the same. Anybody some pointers to check when using the 365 mail server? Regards, Ronald   An error has occurred while handling the request. [User 'admintauw' with session id 'e4941fd8-785c-4450-8827-aa41ff4ff1aa' and roles 'Beheer'] -------- com.mendix.modules.microflowengine.MicroflowException: com.mendix.core.CoreRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: org.apache.commons.mail.EmailException: Sending the email to the following server failed : smtp.office365.com:587 at Basis.Hotfix_MailSturentest (JavaAction : 'SendEmail') Advanced stacktrace: at com.mendix.modules.microflowengine.MicroflowUtil.processException(MicroflowUtil.java:143) Caused by: com.mendix.core.CoreException: com.mendix.core.CoreRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: org.apache.commons.mail.EmailException: Sending the email to the following server failed : smtp.office365.com:587 at com.mendix.core.component.InternalCore.execute(InternalCore.java:495) Caused by: com.mendix.core.CoreRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: org.apache.commons.mail.EmailException: Sending the email to the following server failed : smtp.office365.com:587 at com.mendix.core.actionmanagement.ActionManager.executeSync(ActionManager.java:176) Caused by: com.mendix.systemwideinterfaces.MendixRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: org.apache.commons.mail.EmailException: Sending the email to the following server failed : smtp.office365.com:587 at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:40) Caused by: com.mendix.systemwideinterfaces.MendixRuntimeException: org.apache.commons.mail.EmailException: Sending the email to the following server failed : smtp.office365.com:587 at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:40) Caused by: org.apache.commons.mail.EmailException: Sending the email to the following server failed : smtp.office365.com:587 at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1401) at org.apache.commons.mail.Email.send(Email.java:1428) at emailtemplate.mail.Sender.send(Sender.java:102) at emailtemplate.mail.EmailModule$1.execute(EmailModule.java:136) at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:36) at com.mendix.util.classloading.Runner$1.run(Runner.java:25) at java.security.AccessController.doPrivileged(Native Method) at com.mendix.util.classloading.Runner.runUsingClassLoaderOf(Runner.java:21) at emailtemplate.mail.EmailModule.mail(EmailModule.java:139) at emailtemplate.actions.SendEmail.executeAction(SendEmail.java:130) at emailtemplate.actions.SendEmail.executeAction(SendEmail.java:22) at com.mendix.systemwideinterfaces.core.UserAction.execute(UserAction.java:49) at com.mendix.core.actionmanagement.CoreAction.doCall(CoreAction.java:260) at com.mendix.core.actionmanagement.CoreAction.call(CoreAction.java:248) at com.mendix.core.actionmanagement.ActionManager$1.execute(ActionManager.java:168) at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:36) at com.mendix.core.actionmanagement.ActionManager.executeSync(ActionManager.java:172) at com.mendix.core.component.InternalCore.execute(InternalCore.java:487) at com.mendix.modules.microflowengine.actions.actioncall.JavaAction.execute(JavaAction.scala:52) at com.mendix.modules.microflowengine.microflow.impl.MicroflowObject.execute(MicroflowObject.java:47) at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAfterBreakingIfNecessary(MicroflowImpl.java:192) at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAction(MicroflowImpl.java:149) at com.mendix.systemwideinterfaces.core.UserAction.execute(UserAction.java:49) at com.mendix.core.actionmanagement.CoreAction.doCall(CoreAction.java:260) at com.mendix.core.actionmanagement.CoreAction.call(CoreAction.java:248) at com.mendix.core.actionmanagement.ActionManager$1.execute(ActionManager.java:168) at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:36) at com.mendix.core.actionmanagement.ActionManager.executeSync(ActionManager.java:172) at com.mendix.core.component.InternalCore.execute(InternalCore.java:487) at com.mendix.webui.actions.client.ExecuteAction.execute(ExecuteAction.java:144) at com.mendix.webui.requesthandling.ClientRequestHandler$$anonfun$handleRequest$1.apply$mcV$sp(ClientRequestHandler.scala:312) at com.mendix.webui.requesthandling.ClientRequestHandler$$anonfun$handleRequest$1.apply(ClientRequestHandler.scala:302) at com.mendix.webui.requesthandling.ClientRequestHandler$$anonfun$handleRequest$1.apply(ClientRequestHandler.scala:302) at com.mendix.core.session.Worker$$anonfun$receive$3$$anonfun$2$$anon$1.execute(ActionDispatching.scala:144) at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:36) at com.mendix.core.session.Worker$$anonfun$receive$3$$anonfun$2.apply(ActionDispatching.scala:146) at scala.util.Try$.apply(Try.scala:192) at com.mendix.core.session.Worker$$anonfun$receive$3.applyOrElse(ActionDispatching.scala:140) at akka.actor.Actor$class.aroundReceive(Actor.scala:465) at com.mendix.core.session.Worker.aroundReceive(ActionDispatching.scala:136) at akka.actor.ActorCell.receiveMessage(ActorCell.scala:516) at akka.actor.ActorCell.invoke(ActorCell.scala:487) at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:238) at akka.dispatch.Mailbox.run(Mailbox.scala:220) at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:393) at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260) at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339) at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979) at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107) Caused by: javax.mail.AuthenticationFailedException: 535 5.7.3 Authentication unsuccessful [AM5PR0601CA0032.eurprd06.prod.outlook.com] at com.sun.mail.smtp.SMTPTransport$Authenticator.authenticate(SMTPTransport.java:823) at com.sun.mail.smtp.SMTPTransport.authenticate(SMTPTransport.java:756) at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:673) at javax.mail.Service.connect(Service.java:317) at javax.mail.Service.connect(Service.java:176) at javax.mail.Service.connect(Service.java:125) at javax.mail.Transport.send0(Transport.java:194) at javax.mail.Transport.send(Transport.java:124) at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1391) at org.apache.commons.mail.Email.send(Email.java:1428) at emailtemplate.mail.Sender.send(Sender.java:102) at emailtemplate.mail.EmailModule$1.execute(EmailModule.java:136) at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:36) at com.mendix.util.classloading.Runner$1.run(Runner.java:25) at java.security.AccessController.doPrivileged(Native Method) at com.mendix.util.classloading.Runner.runUsingClassLoaderOf(Runner.java:21) at emailtemplate.mail.EmailModule.mail(EmailModule.java:139) at emailtemplate.actions.SendEmail.executeAction(SendEmail.java:130) at emailtemplate.actions.SendEmail.executeAction(SendEmail.java:22) at com.mendix.systemwideinterfaces.core.UserAction.execute(UserAction.java:49) at com.mendix.core.actionmanagement.CoreAction.doCall(CoreAction.java:260) at com.mendix.core.actionmanagement.CoreAction.call(CoreAction.java:248) at com.mendix.core.actionmanagement.ActionManager$1.execute(ActionManager.java:168) at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:36) at com.mendix.core.actionmanagement.ActionManager.executeSync(ActionManager.java:172) at com.mendix.core.component.InternalCore.execute(InternalCore.java:487) at com.mendix.modules.microflowengine.actions.actioncall.JavaAction.execute(JavaAction.scala:52) at com.mendix.modules.microflowengine.microflow.impl.MicroflowObject.execute(MicroflowObject.java:47) at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAfterBreakingIfNecessary(MicroflowImpl.java:192) at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAction(MicroflowImpl.java:149) at com.mendix.systemwideinterfaces.core.UserAction.execute(UserAction.java:49) at com.mendix.core.actionmanagement.CoreAction.doCall(CoreAction.java:260) at com.mendix.core.actionmanagement.CoreAction.call(CoreAction.java:248) at com.mendix.core.actionmanagement.ActionManager$1.execute(ActionManager.java:168) at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:36) at com.mendix.core.actionmanagement.ActionManager.executeSync(ActionManager.java:172) at com.mendix.core.component.InternalCore.execute(InternalCore.java:487) at com.mendix.webui.actions.client.ExecuteAction.execute(ExecuteAction.java:144) at com.mendix.webui.requesthandling.ClientRequestHandler$$anonfun$handleRequest$1.apply$mcV$sp(ClientRequestHandler.scala:312) at com.mendix.webui.requesthandling.ClientRequestHandler$$anonfun$handleRequest$1.apply(ClientRequestHandler.scala:302) at com.mendix.webui.requesthandling.ClientRequestHandler$$anonfun$handleRequest$1.apply(ClientRequestHandler.scala:302) at com.mendix.core.session.Worker$$anonfun$receive$3$$anonfun$2$$anon$1.execute(ActionDispatching.scala:144) at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:36) at com.mendix.core.session.Worker$$anonfun$receive$3$$anonfun$2.apply(ActionDispatching.scala:146) at scala.util.Try$.apply(Try.scala:192) at com.mendix.core.session.Worker$$anonfun$receive$3.applyOrElse(ActionDispatching.scala:140) at akka.actor.Actor$class.aroundReceive(Actor.scala:465) at com.mendix.core.session.Worker.aroundReceive(ActionDispatching.scala:136) at akka.actor.ActorCell.receiveMessage(ActorCell.scala:516) at akka.actor.ActorCell.invoke(ActorCell.scala:487) at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:238) at akka.dispatch.Mailbox.run(Mailbox.scala:220) at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:393) at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260) at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339) at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979) at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107) [EDIT] The sollution was embarrassing. Since we never had to bother with passwords in the V3 cloud all the passwords where hardcoded to an empty string. Decrypting and filling the Java action with the decrypted value was the sollution.
asked
1 answers
1

Hi Ronald,

 

Perhaps the following page will help you with the issues: https://support.office.com/nl-nl/article/Een-multifunctioneel-apparaat-of-een-toepassing-instellen-voor-het-verzenden-van-e-mail-via-Office-365-69f58e99-c550-4274-ad18-c805d654b4c4?ui=nl-NL&rs=nl-NL&ad=NL#option2.

 

This could be a Office 365 configuration issue.

 

Good luck.

answered