cancel
Showing results for 
Search instead for 
Did you mean: 

Mail Task Failure

frog
Champ in-the-making
Champ in-the-making

I'm using the web interface activity-app, version 1.6.3

However, when I do a mail task, it always fails, and the error log is like this:

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:1421)

at org.apache.commons.mail.Email.send(Email.java:1448)

at org.activiti.engine.impl.bpmn.behavior.MailActivityBehavior.execute(MailActivityBehavior.java:102)

... 168 more

Caused by: com.sun.mail.util.MailConnectException: Couldn't connect to host, port: localhost, 25; timeout 60000;

  nested exception is:

java.net.ConnectException: Connection refused (Connection refused)

at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:2118)

at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:712)

at javax.mail.Service.connect(Service.java:366)

at javax.mail.Service.connect(Service.java:246)

at javax.mail.Service.connect(Service.java:195)

at javax.mail.Transport.send0(Transport.java:254)

at javax.mail.Transport.send(Transport.java:124)

at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1411)

... 170 more

Caused by: java.net.ConnectException: Connection refused (Connection refused)

at java.net.PlainSocketImpl.socketConnect(Native Method)

at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)

at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)

at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)

at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)

at java.net.Socket.connect(Socket.java:589)

at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:329)

at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:238)

at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:2084)

... 177 more

Can anyone give me a walk through of how to solve this problem??

Thanks!

1 ACCEPTED ANSWER

cjose
Elite Collaborator
Elite Collaborator

Also, since you are using 1.6.3 you will need an additional property (given below) in your activiti-app.properties file, for the out of the box email templates to work.

spring.freemarker.template-loader-path=classpath:/email-templates

View answer in original post

2 REPLIES 2

cjose
Elite Collaborator
Elite Collaborator

Do you have an email server running on your localhost on port 25? If not, you will need to configure your properties file as explained in Email Server configuration | Alfresco Documentation.

This thread has got some working examples in it. Hope this helps.

Regards,

Ciju

cjose
Elite Collaborator
Elite Collaborator

Also, since you are using 1.6.3 you will need an additional property (given below) in your activiti-app.properties file, for the out of the box email templates to work.

spring.freemarker.template-loader-path=classpath:/email-templates

Getting started

Explore our Alfresco products with the links below. Use labels to filter content by product module.