Mail Task Failure

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Member II

Mail Task Failure

Jump to solution

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 Solution

Accepted Solutions
Highlighted
Senior Member II

Re: Mail Task Failure

Jump to solution

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 solution in original post

2 Replies
Highlighted
Senior Member II

Re: Mail Task Failure

Jump to solution

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

Highlighted
Senior Member II

Re: Mail Task Failure

Jump to solution

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 solution in original post