cancel
Showing results for 
Search instead for 
Did you mean: 

Mail configuration - external smtp or local postfix does not work

raphaelallner
Champ in-the-making
Champ in-the-making
Hello Community,

I am a little bit frustrated. My Activiti System is running on a  Linux Mint 17 Qiana Server.
I am using the version 5.15.1 because I have to many processes and system enhancements that are only working with this version.

I want to move forward to a productive usage and therefore I want to use Mail Tasks. I changed the activiti-standalone-context.xml file like this:

<bean id="processEngineConfiguration" class="org.activiti.spring.SpringProcessEngineConfiguration">
     ……
    <property name="mailServerHost" value="smtp.web.de" />
    <property name="mailServerPort" value="578" />
    <property name="mailServerUsername" value="username" />
    <property name="mailServerPassword" value="password" />
    <property name="mailServerUseSSL" value="true" />
    <property name="mailServerUseTLS" value="true" />
     …..
</bean>

With this configuration i tried my personal Mail Provider to send E-Mails via smtp.

Caused by: org.activiti.engine.ActivitiException: Could not send e-mail in execution 37501
….
Caused by: org.apache.commons.mail.EmailException: Sending the email to the following server failed : smtp.web.de$
        at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1242)
        at org.apache.commons.mail.Email.send(Email.java:1267)
        at org.activiti.engine.impl.bpmn.behavior.MailActivityBehavior.execute(MailActivityBehavior.java:83)
        … 104 more
Caused by: javax.mail.MessagingException: Could not connect to SMTP host: smtp.web.de, port: 465;
  nested exception is:
        java.net.ConnectException: Verbindungsaufbau abgelehnt <- engl. Connection declined
        at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1391)
        at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:412)
        at javax.mail.Service.connect(Service.java:310)
        at javax.mail.Service.connect(Service.java:169)
        at javax.mail.Service.connect(Service.java:118)
        at javax.mail.Transport.send0(Transport.java:188)
        at javax.mail.Transport.send(Transport.java:118)
        at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1232)
        … 106 more
Caused by: java.net.ConnectException: Verbindungsaufbau abgelehnt <- engl. Connection declined
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:345)
        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 sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:649)
        at sun.security.ssl.BaseSSLSocketImpl.connect(BaseSSLSocketImpl.java:173)
        at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:233)
        at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:163)
        at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1359)
        … 113 more


Is it my Provider or is it something else?

I also tried to use Postfix but this does not work either. Here is the Postfix log:

Jul 15 14:42:25 ->hostnameXXX<- postfix/smtp[30726]: CDAEF24E84: to=<->emailadressXXX<-@web.de>, relay=none, delay=63569, delays=63569/0.07/0/0, dsn=4.4.1, status=deferred (connect to mx-ha03.web.de[212.227.15.17]:25: Connection refused)

Maybe someone can help me. Thank you!
1 REPLY 1

vasile_dirla
Star Contributor
Star Contributor
Hi,
Caused by: javax.mail.MessagingException: Could not connect to SMTP host: smtp.web.de, port: 465;

First of all you have to be sure this machine could access the mail server on the port 465
please check if the mail server could be accessed from the machine where you have installed Activiti.
(you could use telnet.. or whatever you prefer)

If you are able to access it from this machine and send a new email message from telnet, then the problem moves to configurations.