Unable to send mail from Gmail using EmailTemplate module

1
But I have configured the server to smtp gmail server (This). The settings are as follows: Server settings: User name: xxx.gmail.com Password: xxx's gmail password Server: smtp.gmail.com Port: 587 Use TLS: Checked Email handling: From address: xxx.gmail.com Maximum number of attempts: 2 When I send the mail I get the following error in the log: It is working with yahoo account. When I configured with Yahoo mail and its smtp server, I am able to send mail to any other mail id. However with gmail it is throwing the below error. Message: Failed to send an email to: nithiin.vendra@gmail.com an error occured in the SendEmail java action Error message: 534-5.7.14 <https: accounts.google.com="" continuesignin?sarp="1&amp;scc=1&amp;plt=AKgnsbtU9" 534-5.7.14="" 9diayrgfkwo6morxy9tkiyu-d8o0djcmdv2gjt8hsfsqrfwlmoq1k9_kuiai_k6qoznr1i="" 534-5.7.14="" ifury5fyh2hvgzde9yxbossubf7rhvaq_elmvmf1qj4d9724embeiwu7vpyj_2crb8i91g="" 534-5.7.14="" 7bbmddnvl309l4a-ejsdwddtv1--fbony0ydcath4qqgqopqlhgoty8l2dfjww1w7_rb4v="" 534-5.7.14="" ijg7nmkpzl8v8pqyzyi9pelzqk98=""> Please log in via your web browser and 534-5.7.14 then try again. 534-5.7.14 Learn more at 534 5.7.14 https://support.google.com/mail/answer/78754 gi4sm19026111pbc.4 - gsmtp Stack Trace: 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.gmail.com:587 at com.mendix.core.component.InternalCore.execute(InternalCore.java:237) Caused by: com.mendix.systemwideinterfaces.MendixRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: org.apache.commons.mail.EmailException: Sending the email to the following server failed : smtp.gmail.com:587 at com.mendix.core.actionmanagement.ActionManager.executeSync(ActionManager.java:202) Caused by: com.mendix.systemwideinterfaces.MendixRuntimeException: org.apache.commons.mail.EmailException: Sending the email to the following server failed : smtp.gmail.com:587 at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:36) Caused by: org.apache.commons.mail.EmailException: Sending the email to the following server failed : smtp.gmail.com:587 at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:36) Caused by: Sending the email to the following server failed : smtp.gmail.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:112) at emailtemplate.mail.EmailModule$1.execute(EmailModule.java:136) at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:32) at com.mendix.util.classloading.Runner$1.run(Runner.java:21) at java.security.AccessController.doPrivileged(Native Method) at com.mendix.util.classloading.Runner.runUsingClassLoaderOf(Runner.java:17) at emailtemplate.mail.EmailModule.mail(EmailModule.java:130) at emailtemplate.actions.SendEmail.executeAction(SendEmail.java:133) at emailtemplate.actions.SendEmail.executeAction(SendEmail.java:25) at com.mendix.systemwideinterfaces.core.UserAction.execute(UserAction.java:49) at com.mendix.core.actionmanagement.CoreAction.doCall(CoreAction.java:261) at com.mendix.core.actionmanagement.CoreAction.call(CoreAction.java:249) at com.mendix.core.actionmanagement.ActionManager$1.execute(ActionManager.java:192) at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:32) at com.mendix.core.actionmanagement.ActionManager.executeSync(ActionManager.java:198) at com.mendix.core.component.InternalCore.execute(InternalCore.java:229) at com.mendix.modules.microflowengine.actions.actioncall.JavaAction.execute(JavaAction.scala:52) at com.mendix.modules.microflowengine.microflow.impl.MicroflowObject.execute(MicroflowObject.java:44) 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:261) at com.mendix.core.actionmanagement.CoreAction.call(CoreAction.java:249) at com.mendix.core.actionmanagement.ActionManager$1.execute(ActionManager.java:192) at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:32) at com.mendix.core.actionmanagement.ActionManager.executeSync(ActionManager.java:198) at com.mendix.core.component.InternalCore.executeSync(InternalCore.java:206) at com.mendix.modules.microflowengine.actions.SubMicroflowAction.execute(SubMicroflowAction.scala:38) at com.mendix.modules.microflowengine.microflow.impl.MicroflowObject.execute(MicroflowObject.java:44) 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:261) at com.mendix.core.actionmanagement.CoreAction.call(CoreAction.java:249) at com.mendix.core.actionmanagement.ActionManager$1.execute(ActionManager.java:192) at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:32) at com.mendix.core.actionmanagement.ActionManager.executeSync(ActionManager.java:198) at com.mendix.core.component.InternalCore.execute(InternalCore.java:229) at com.mendix.webui.actions.client.ExecuteAction.execute(ExecuteAction.java:135) at com.mendix.webui.requesthandling.ClientRequestHandler$$anonfun$handleRequest$1.apply$mcV$sp(ClientRequestHandler.scala:300) at com.mendix.webui.requesthandling.ClientRequestHandler$$anonfun$handleRequest$1.apply(ClientRequestHandler.scala:293) at com.mendix.webui.requesthandling.ClientRequestHandler$$anonfun$handleRequest$1.apply(ClientRequestHandler.scala:293) at com.mendix.core.session.Worker$$anonfun$receive$3$$anonfun$2$$anon$1.execute(ActionDispatching.scala:125) at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:32) at com.mendix.core.session.Worker$$anonfun$receive$3$$anonfun$2.apply(ActionDispatching.scala:127) at scala.util.Try$.apply(Try.scala:191) at com.mendix.core.session.Worker$$anonfun$receive$3.applyOrElse(ActionDispatching.scala:121) at akka.actor.Actor$class.aroundReceive(Actor.scala:465) at com.mendix.core.session.Worker.aroundReceive(ActionDispatching.scala:117) 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: 534-5.7.14 <https: accounts.google.com="" continuesignin?sarp="1&amp;scc=1&amp;plt=AKgnsbtU9" 534-5.7.14="" 9diayrgfkwo6morxy9tkiyu-d8o0djcmdv2gjt8hsfsqrfwlmoq1k9_kuiai_k6qoznr1i="" 534-5.7.14="" ifury5fyh2hvgzde9yxbossubf7rhvaq_elmvmf1qj4d9724embeiwu7vpyj_2crb8i91g="" 534-5.7.14="" 7bbmddnvl309l4a-ejsdwddtv1--fbony0ydcath4qqgqopqlhgoty8l2dfjww1w7_rb4v="" 534-5.7.14="" ijg7nmkpzl8v8pqyzyi9pelzqk98=""> Please log in via your web browser and 534-5.7.14 then try again. 534-5.7.14 Learn more at 534 5.7.14 https://support.google.com/mail/answer/78754 gi4sm19026111pbc.4 - gsmtp 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:112) at emailtemplate.mail.EmailModule$1.execute(EmailModule.java:136) at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:32) at com.mendix.util.classloading.Runner$1.run(Runner.java:21) at java.security.AccessController.doPrivileged(Native Method) at com.mendix.util.classloading.Runner.runUsingClassLoaderOf(Runner.java:17) at emailtemplate.mail.EmailModule.mail(EmailModule.java:130) at emailtemplate.actions.SendEmail.executeAction(SendEmail.java:133) at emailtemplate.actions.SendEmail.executeAction(SendEmail.java:25) at com.mendix.systemwideinterfaces.core.UserAction.execute(UserAction.java:49) at com.mendix.core.actionmanagement.CoreAction.doCall(CoreAction.java:261) at com.mendix.core.actionmanagement.CoreAction.call(CoreAction.java:249) at com.mendix.core.actionmanagement.ActionManager$1.execute(ActionManager.java:192) at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:32) at com.mendix.core.actionmanagement.ActionManager.executeSync(ActionManager.java:198) at com.mendix.core.component.InternalCore.execute(InternalCore.java:229) at com.mendix.modules.microflowengine.actions.actioncall.JavaAction.execute(JavaAction.scala:52) at com.mendix.modules.microflowengine.microflow.impl.MicroflowObject.execute(MicroflowObject.java:44) 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:261) at com.mendix.core.actionmanagement.CoreAction.call(CoreAction.java:249) at com.mendix.core.actionmanagement.ActionManager$1.execute(ActionManager.java:192) at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:32) at com.mendix.core.actionmanagement.ActionManager.executeSync(ActionManager.java:198) at com.mendix.core.component.InternalCore.executeSync(InternalCore.java:206) at com.mendix.modules.microflowengine.actions.SubMicroflowAction.execute(SubMicroflowAction.scala:38) at com.mendix.modules.microflowengine.microflow.impl.MicroflowObject.execute(MicroflowObject.java:44) 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:261) at com.mendix.core.actionmanagement.CoreAction.call(CoreAction.java:249) at com.mendix.core.actionmanagement.ActionManager$1.execute(ActionManager.java:192) at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:32) at com.mendix.core.actionmanagement.ActionManager.executeSync(ActionManager.java:198) at com.mendix.core.component.InternalCore.execute(InternalCore.java:229) at com.mendix.webui.actions.client.ExecuteAction.execute(ExecuteAction.java:135) at com.mendix.webui.requesthandling.ClientRequestHandler$$anonfun$handleRequest$1.apply$mcV$sp(ClientRequestHandler.scala:300) at com.mendix.webui.requesthandling.ClientRequestHandler$$anonfun$handleRequest$1.apply(ClientRequestHandler.scala:293) at com.mendix.webui.requesthandling.ClientRequestHandler$$anonfun$handleRequest$1.apply(ClientRequestHandler.scala:293) at com.mendix.core.session.Worker$$anonfun$receive$3$$anonfun$2$$anon$1.execute(ActionDispatching.scala:125) at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:32) at com.mendix.core.session.Worker$$anonfun$receive$3$$anonfun$2.apply(ActionDispatching.scala:127) at scala.util.Try$.apply(Try.scala:191) at com.mendix.core.session.Worker$$anonfun$receive$3.applyOrElse(ActionDispatching.scala:121) at akka.actor.Actor$class.aroundReceive(Actor.scala:465) at com.mendix.core.session.Worker.aroundReceive(ActionDispatching.scala:117) 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)
asked
2 answers
2

You can try using port 465 and SSL instead of port 587 and TLS. That's working for me.

answered
0

It is working with yahoo account. When I configured with Yahoo mail and its smtp server, I am able to send mail to any other mail id. However with gmail it is throwing the above error.

answered