SOLVED Mail Node (cannot send mail error)

Nous essayons de faire OpenKM aussi intuitif que possible, mais tout avis est bienvenu.

Moderator: dedisoft

Forum rules
Avant de poser une question, merci de regarder la documentation du wiki ou d'utiliser la fonction recherche du forum. Et rappelez vous que nous n'avons ni boule de cristal ni possibilité de lire dans les pensées, aussi pensez à spécifier quelle version d'OpenKM vous utilisez ainsi que la version du navigateur web et du système d'exploitation. Pour de plus amples informations lisez Comment reporter un bug efficacement (anglais).
Post Reply
jimac
Expert Boarder
Expert Boarder
Posts: 89
Joined: Thu Dec 01, 2016 4:01 am

SOLVED Mail Node (cannot send mail error)

Post by jimac » Sun Dec 25, 2016 4:27 am

(I am using jboss 5.00,(server) jboss-as 7.1.0, openkm 6.3.1 )

PLEASE SEE THE ATTACHED PICTURE

this is my server.xml

Code: Select all

<Resource name="mail/OpenKM" auth="Container" type="javax.mail.Session"
 mail.transport.protocol="smtp"
 mail.smtp.auth="true"
 mail.smtp.host="smtp.gmail.com"
 mail.smtp.port="465"
 mail.smtp.user="ricateano10@gmail.com" 
 password="*****"
 mail.smtp.from="ricateano10@gmail.com"
 mail.smtp.quitwait="false"
 mail.smtp.starttls.enable="true"
 mail.smtp.socketFactory.class="javax.net.ssl.SSLSocketFactory"
 mail.debug="true"/>
the standalone-full xml.

Code: Select all

   <mail-session jndi-name="java:jboss/mail/Default">
                   <smtp-server outbound-socket-binding-ref="mail-smtp">
            </mail-session>

In the attached picture, it says cannot send mail.
how to solve this?
Thank you!



Code: Select all

        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
        at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:173)
        at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
        at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423)
        at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079)
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:620)
        at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
        at java.lang.Thread.run(Thread.java:745)
Caused by: org.jbpm.JbpmException: Cannot send email
        at org.jbpm.mail.Mail.send(Mail.java:217)
        at org.jbpm.mail.Mail.send(Mail.java:177)
        at org.jbpm.mail.Mail.execute(Mail.java:76)
        at org.jbpm.graph.def.Action.execute(Action.java:129)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:197)
        at org.jbpm.graph.def.Action_$$_javassist_70.execute(Action_$$_javassist_70.java)
        at org.jbpm.graph.def.GraphElement.executeAction(GraphElement.java:284)
        at org.jbpm.graph.node.MailNode.execute(MailNode.java:29)
        at org.jbpm.graph.def.Node.enter(Node.java:390)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:197)
        at org.jbpm.graph.def.Node_$$_javassist_58.enter(Node_$$_javassist_58.java)
        at org.jbpm.graph.def.Transition.take(Transition.java:167)
        at org.jbpm.graph.def.Node.leave(Node.java:479)
        at org.jbpm.graph.node.StartState.leave(StartState.java:82)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:197)
        at org.jbpm.graph.def.Node_$$_javassist_58.leave(Node_$$_javassist_58.java)
        at org.jbpm.graph.exe.Token.signal(Token.java:223)
        at org.jbpm.graph.exe.Token.signal(Token.java:150)
        at com.openkm.module.common.CommonWorkflowModule.runProcessDefinition(CommonWorkflowModule.java:281)
        ... 56 more
Caused by: com.sun.mail.util.MailConnectException: Couldn't connect to host, port: localhost, 25; timeout -1;
  nested exception is:
        java.net.ConnectException: Connection refused: connect
        at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:2053)
        at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:697)
        at javax.mail.Service.connect(Service.java:364)
        at javax.mail.Service.connect(Service.java:245)
        at javax.mail.Service.connect(Service.java:194)
        at javax.mail.Transport.send0(Transport.java:253)
        at javax.mail.Transport.send(Transport.java:124)
        at org.jbpm.mail.Mail.sendMailInternal(Mail.java:256)
        at org.jbpm.mail.Mail.send(Mail.java:201)
        ... 86 more
Caused by: java.net.ConnectException: Connection refused: connect
        at java.net.DualStackPlainSocketImpl.connect0(Native Method)
        at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79)
        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.PlainSocketImpl.connect(PlainSocketImpl.java:172)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
        at java.net.Socket.connect(Socket.java:589)
        at java.net.Socket.connect(Socket.java:538)
        at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:312)
        at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:236)
        at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:2019)
        ... 94 more
Attachments
mail error1a.png
mail error1a.png (6.37 KiB) Viewed 417 times
mail error1.png
Last edited by jimac on Wed Dec 28, 2016 12:36 am, edited 1 time in total.

jllort
Moderator
Moderator
Posts: 9647
Joined: Fri Dec 21, 2007 11:23 am
Location: Sineu - ( Illes Balears ) - Spain
Contact:

Re: Mail Node (cannot send mail error)

Post by jllort » Mon Dec 26, 2016 3:04 pm

Go to Administration > Tools > Check mail, and test from there your mail configuration.

I suggest use MailUtils class for sending mails in JBPM transactions.

jimac
Expert Boarder
Expert Boarder
Posts: 89
Joined: Thu Dec 01, 2016 4:01 am

Re: Mail Node (cannot send mail error)

Post by jimac » Tue Dec 27, 2016 5:20 am

jllort wrote:Go to Administration > Tools > Check mail, and test from there your mail configuration.

I suggest use MailUtils class for sending mails in jBPM transactions.
--

Good day!

I have used the check mail.. and it is OK.

ahh so you are saying that when I am going to use the MAIL NODE in jboss workflow..i need to use the MailUtils?
so when I use the mail node, I need to add action on it?

can you send me the code for that?
Thank you!
:D

jimac
Expert Boarder
Expert Boarder
Posts: 89
Joined: Thu Dec 01, 2016 4:01 am

Re: Mail Node (cannot send mail error)

Post by jimac » Wed Dec 28, 2016 12:36 am

I have already solved the problem.
I did not use a MAIL node.
i used java code

jllort
Moderator
Moderator
Posts: 9647
Joined: Fri Dec 21, 2007 11:23 am
Location: Sineu - ( Illes Balears ) - Spain
Contact:

Re: SOLVED Mail Node (cannot send mail error)

Post by jllort » Wed Dec 28, 2016 6:10 pm

JBPM automatically sends mails when a node is assigned to some user. But you can also use OpenKM Mail class ( seems what you have decided to use ) between task nodes ( the transitions ) for sending Mail address. We are happy you have succeed on it.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest