Email Module Template Email Error

0
I'm trying to use the Email Template Module to send emails using a gmail server. I have the username set to my personal gmail address, using smtp.gmail.com as the server address, and port 465 (as I've seen suggested in other posts). When I select TLS, I get the following error: com.mendix.core.CoreRuntimeException: org.apache.commons.mail.EmailException: Sending the email to the following server failed : smtp.gmail.com:465 at com.mendix.core.component.InternalCore.execute(SourceFile:272) Caused by: org.apache.commons.mail.EmailException: Sending the email to the following server failed : smtp.gmail.com:465 at com.mendix.core.actionmanagement.ActionManager.executeSync(SourceFile:217) Caused by: Sending the email to the following server failed : smtp.gmail.com:465 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:101) at emailtemplate.mail.EmailModule.mail(EmailModule.java:134) at emailtemplate.actions.SendEmail.executeAction(SendEmail.java:133) at emailtemplate.actions.SendEmail.executeAction(SendEmail.java:25) at com.mendix.systemwideinterfaces.core.UserAction.execute(SourceFile:53) at com.mendix.core.actionmanagement.CoreAction.call(SourceFile:271) at com.mendix.core.actionmanagement.ActionManager.executeSync(SourceFile:206) at com.mendix.core.component.InternalCore.execute(SourceFile:260) at com.mendix.io.execute(SourceFile:42) at com.mendix.iX.a(SourceFile:47) at com.mendix.iW.a(SourceFile:191) at com.mendix.iW.executeAction(SourceFile:152) at com.mendix.systemwideinterfaces.core.UserAction.execute(SourceFile:53) at com.mendix.core.actionmanagement.CoreAction.call(SourceFile:271) at com.mendix.core.actionmanagement.ActionManager.executeSync(SourceFile:206) at com.mendix.core.component.InternalCore.executeSync(SourceFile:233) at com.mendix.modules.microflowengine.actions.SubMicroflowAction.execute(SourceFile:33) at com.mendix.iX.a(SourceFile:47) at com.mendix.iW.a(SourceFile:191) at com.mendix.iW.executeAction(SourceFile:152) at com.mendix.systemwideinterfaces.core.UserAction.execute(SourceFile:53) at com.mendix.core.actionmanagement.CoreAction.call(SourceFile:271) at com.mendix.core.actionmanagement.ActionManager.executeSync(SourceFile:206) at com.mendix.core.component.InternalCore.execute(SourceFile:260) at com.mendix.jw.a(SourceFile:135) at com.mendix.pG.a(SourceFile:296) at com.mendix.pG$a.apply$mcI$sp(SourceFile:195) at com.mendix.pG$i.a(SourceFile:211) at com.mendix.pG$i.execute(SourceFile:208) at com.mendix.core.session.Worker$$anonfun$receive$3.applyOrElse(SourceFile:132) at akka.actor.ActorCell.receiveMessage(ActorCell.scala:498) at akka.actor.ActorCell.invoke(ActorCell.scala:456) at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:237) at akka.dispatch.Mailbox.run(Mailbox.scala:219) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:744) Caused by: Exception reading response at com.sun.mail.smtp.SMTPTransport.readServerResponse(SMTPTransport.java:1462) at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1260) at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:370) at javax.mail.Service.connect(Service.java:297) 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.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:101) at emailtemplate.mail.EmailModule.mail(EmailModule.java:134) at emailtemplate.actions.SendEmail.executeAction(SendEmail.java:133) at emailtemplate.actions.SendEmail.executeAction(SendEmail.java:25) at com.mendix.systemwideinterfaces.core.UserAction.execute(SourceFile:53) at com.mendix.core.actionmanagement.CoreAction.call(SourceFile:271) at com.mendix.core.actionmanagement.ActionManager.executeSync(SourceFile:206) at com.mendix.core.component.InternalCore.execute(SourceFile:260) at com.mendix.io.execute(SourceFile:42) at com.mendix.iX.a(SourceFile:47) at com.mendix.iW.a(SourceFile:191) at com.mendix.iW.executeAction(SourceFile:152) at com.mendix.systemwideinterfaces.core.UserAction.execute(SourceFile:53) at com.mendix.core.actionmanagement.CoreAction.call(SourceFile:271) at com.mendix.core.actionmanagement.ActionManager.executeSync(SourceFile:206) at com.mendix.core.component.InternalCore.executeSync(SourceFile:233) at com.mendix.modules.microflowengine.actions.SubMicroflowAction.execute(SourceFile:33) at com.mendix.iX.a(SourceFile:47) at com.mendix.iW.a(SourceFile:191) at com.mendix.iW.executeAction(SourceFile:152) at com.mendix.systemwideinterfaces.core.UserAction.execute(SourceFile:53) at com.mendix.core.actionmanagement.CoreAction.call(SourceFile:271) at com.mendix.core.actionmanagement.ActionManager.executeSync(SourceFile:206) at com.mendix.core.component.InternalCore.execute(SourceFile:260) at com.mendix.jw.a(SourceFile:135) at com.mendix.pG.a(SourceFile:296) at com.mendix.pG$a.apply$mcI$sp(SourceFile:195) at com.mendix.pG$i.a(SourceFile:211) at com.mendix.pG$i.execute(SourceFile:208) at com.mendix.core.session.Worker$$anonfun$receive$3.applyOrElse(SourceFile:132) at akka.actor.ActorCell.receiveMessage(ActorCell.scala:498) at akka.actor.ActorCell.invoke(ActorCell.scala:456) at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:237) at akka.dispatch.Mailbox.run(Mailbox.scala:219) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:744) Caused by: Read timed out at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(SocketInputStream.java:152) at java.net.SocketInputStream.read(SocketInputStream.java:122) at com.sun.mail.util.TraceInputStream.read(TraceInputStream.java:97) at java.io.BufferedInputStream.fill(BufferedInputStream.java:235) at java.io.BufferedInputStream.read(BufferedInputStream.java:254) at com.sun.mail.util.LineInputStream.readLine(LineInputStream.java:75) at com.sun.mail.smtp.SMTPTransport.readServerResponse(SMTPTransport.java:1440) at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1260) at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:370) at javax.mail.Service.connect(Service.java:297) 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.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:101) at emailtemplate.mail.EmailModule.mail(EmailModule.java:134) at emailtemplate.actions.SendEmail.executeAction(SendEmail.java:133) at emailtemplate.actions.SendEmail.executeAction(SendEmail.java:25) at com.mendix.systemwideinterfaces.core.UserAction.execute(SourceFile:53) at com.mendix.core.actionmanagement.CoreAction.call(SourceFile:271) at com.mendix.core.actionmanagement.ActionManager.executeSync(SourceFile:206) at com.mendix.core.component.InternalCore.execute(SourceFile:260) at com.mendix.io.execute(SourceFile:42) at com.mendix.iX.a(SourceFile:47) at com.mendix.iW.a(SourceFile:191) at com.mendix.iW.executeAction(SourceFile:152) at com.mendix.systemwideinterfaces.core.UserAction.execute(SourceFile:53) at com.mendix.core.actionmanagement.CoreAction.call(SourceFile:271) at com.mendix.core.actionmanagement.ActionManager.executeSync(SourceFile:206) at com.mendix.core.component.InternalCore.executeSync(SourceFile:233) at com.mendix.modules.microflowengine.actions.SubMicroflowAction.execute(SourceFile:33) at com.mendix.iX.a(SourceFile:47) at com.mendix.iW.a(SourceFile:191) at com.mendix.iW.executeAction(SourceFile:152) at com.mendix.systemwideinterfaces.core.UserAction.execute(SourceFile:53) at com.mendix.core.actionmanagement.CoreAction.call(SourceFile:271) at com.mendix.core.actionmanagement.ActionManager.executeSync(SourceFile:206) at com.mendix.core.component.InternalCore.execute(SourceFile:260) at com.mendix.jw.a(SourceFile:135) at com.mendix.pG.a(SourceFile:296) at com.mendix.pG$a.apply$mcI$sp(SourceFile:195) at com.mendix.pG$i.a(SourceFile:211) at com.mendix.pG$i.execute(SourceFile:208) at com.mendix.core.session.Worker$$anonfun$receive$3.applyOrElse(SourceFile:132) at akka.actor.ActorCell.receiveMessage(ActorCell.scala:498) at akka.actor.ActorCell.invoke(ActorCell.scala:456) at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:237) at akka.dispatch.Mailbox.run(Mailbox.scala:219) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:744) When I try to use SSL, I get this error: com.mendix.core.CoreRuntimeException: org.apache.commons.mail.EmailException: Sending the email to the following server failed : smtp.gmail.com:465 at com.mendix.core.component.InternalCore.execute(SourceFile:272) Caused by: org.apache.commons.mail.EmailException: Sending the email to the following server failed : smtp.gmail.com:465 at com.mendix.core.actionmanagement.ActionManager.executeSync(SourceFile:217) Caused by: Sending the email to the following server failed : smtp.gmail.com:465 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:101) at emailtemplate.mail.EmailModule.mail(EmailModule.java:134) at emailtemplate.actions.SendEmail.executeAction(SendEmail.java:133) at emailtemplate.actions.SendEmail.executeAction(SendEmail.java:25) at com.mendix.systemwideinterfaces.core.UserAction.execute(SourceFile:53) at com.mendix.core.actionmanagement.CoreAction.call(SourceFile:271) at com.mendix.core.actionmanagement.ActionManager.executeSync(SourceFile:206) at com.mendix.core.component.InternalCore.execute(SourceFile:260) at com.mendix.io.execute(SourceFile:42) at com.mendix.iX.a(SourceFile:47) at com.mendix.iW.a(SourceFile:191) at com.mendix.iW.executeAction(SourceFile:152) at com.mendix.systemwideinterfaces.core.UserAction.execute(SourceFile:53) at com.mendix.core.actionmanagement.CoreAction.call(SourceFile:271) at com.mendix.core.actionmanagement.ActionManager.executeSync(SourceFile:206) at com.mendix.core.component.InternalCore.executeSync(SourceFile:233) at com.mendix.modules.microflowengine.actions.SubMicroflowAction.execute(SourceFile:33) at com.mendix.iX.a(SourceFile:47) at com.mendix.iW.a(SourceFile:191) at com.mendix.iW.executeAction(SourceFile:152) at com.mendix.systemwideinterfaces.core.UserAction.execute(SourceFile:53) at com.mendix.core.actionmanagement.CoreAction.call(SourceFile:271) at com.mendix.core.actionmanagement.ActionManager.executeSync(SourceFile:206) at com.mendix.core.component.InternalCore.execute(SourceFile:260) at com.mendix.jw.a(SourceFile:135) at com.mendix.pG.a(SourceFile:296) at com.mendix.pG$a.apply$mcI$sp(SourceFile:195) at com.mendix.pG$i.a(SourceFile:211) at com.mendix.pG$i.execute(SourceFile:208) at com.mendix.core.session.Worker$$anonfun$receive$3.applyOrElse(SourceFile:132) at akka.actor.ActorCell.receiveMessage(ActorCell.scala:498) at akka.actor.ActorCell.invoke(ActorCell.scala:456) at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:237) at akka.dispatch.Mailbox.run(Mailbox.scala:219) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:744) Caused by: null 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.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:101) at emailtemplate.mail.EmailModule.mail(EmailModule.java:134) at emailtemplate.actions.SendEmail.executeAction(SendEmail.java:133) at emailtemplate.actions.SendEmail.executeAction(SendEmail.java:25) at com.mendix.systemwideinterfaces.core.UserAction.execute(SourceFile:53) at com.mendix.core.actionmanagement.CoreAction.call(SourceFile:271) at com.mendix.core.actionmanagement.ActionManager.executeSync(SourceFile:206) at com.mendix.core.component.InternalCore.execute(SourceFile:260) at com.mendix.io.execute(SourceFile:42) at com.mendix.iX.a(SourceFile:47) at com.mendix.iW.a(SourceFile:191) at com.mendix.iW.executeAction(SourceFile:152) at com.mendix.systemwideinterfaces.core.UserAction.execute(SourceFile:53) at com.mendix.core.actionmanagement.CoreAction.call(SourceFile:271) at com.mendix.core.actionmanagement.ActionManager.executeSync(SourceFile:206) at com.mendix.core.component.InternalCore.executeSync(SourceFile:233) at com.mendix.modules.microflowengine.actions.SubMicroflowAction.execute(SourceFile:33) at com.mendix.iX.a(SourceFile:47) at com.mendix.iW.a(SourceFile:191) at com.mendix.iW.executeAction(SourceFile:152) at com.mendix.systemwideinterfaces.core.UserAction.execute(SourceFile:53) at com.mendix.core.actionmanagement.CoreAction.call(SourceFile:271) at com.mendix.core.actionmanagement.ActionManager.executeSync(SourceFile:206) at com.mendix.core.component.InternalCore.execute(SourceFile:260) at com.mendix.jw.a(SourceFile:135) at com.mendix.pG.a(SourceFile:296) at com.mendix.pG$a.apply$mcI$sp(SourceFile:195) at com.mendix.pG$i.a(SourceFile:211) at com.mendix.pG$i.execute(SourceFile:208) at com.mendix.core.session.Worker$$anonfun$receive$3.applyOrElse(SourceFile:132) at akka.actor.ActorCell.receiveMessage(ActorCell.scala:498) at akka.actor.ActorCell.invoke(ActorCell.scala:456) at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:237) at akka.dispatch.Mailbox.run(Mailbox.scala:219) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:744) I've disabled cloud security (as was also suggested in another post). Is there another setting I need to change? Or did I not setup something correctly? Thanks Adam
asked
2 answers
2

use port 25 instead

answered
0

Did you set the SSL to true?
GMAIL needs that

answered