AnsweredAssumed Answered

E-mail Configuration

Question asked by geetha on May 17, 2015
Latest reply on Feb 24, 2016 by kecondezo
Hi all,

I am new to Activiti BPM, I am trying to customize the source code and making changes to that, right now i made few changes like logo etc. in activiti-webapp-explorer2 project and deployed war file in Tomcat and got the output as according to changes. But now i am trying to configure the e-mail server to point to g-mail server by adding below configuration in activiti-webapp-explorer2\src\main\resources\activiti-custom-context.xml and build, re-deployed in tomcat.

<property name="mailServerHost" value="smtp.gmail.com" />
           <property name="mailServerPort" value="587" />
           <property name="mailServerUseSSL" value="false" />
           <property name="mailServerUseTLS" value="true" />
           <property name="mailServerDefaultFrom" value="xyz@gmail.com" />
           <property name="mailServerUsername" value="xyz@gmail.com" />
           <property name="mailServerPassword" value="xyz123" />

When i am trying to execute laptopOrdering-HumanProcess workflow given in activiti pdf, the e-mail task is failing and giving below error. Please let me know where do we need to put this configuration in the source code.

Caused by: org.apache.commons.mail.EmailException: Sending the email to the following server failed : localhost:25
at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1401)
at org.apache.commons.mail.Email.send(Email.java:1428)
at org.activiti.engine.impl.bpmn.behavior.MailActivityBehavior.execute(MailActivityBehavior.java:66)
… 75 more
Caused by: javax.mail.MessagingException: Could not connect to SMTP host: localhost, port: 25;
nested exception is:
java.net.ConnectException: Connection refused: connect
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1391)
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:370)
at javax.mail.Service.connect(Service.java:275)
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)
… 77 more
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)

Below version used:
Activiti Version: 5.17.0
Tomact 7
JDK 8

Thanks,
Geetha
      

Outcomes