• ==

  • OpenKM has many interesting features, but requires some configuration process to show its full potential.
OpenKM has many interesting features, but requires some configuration process to show its full potential.
Forum rules: Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.

==

 #750  by hbcomcn
 
==
Last edited by hbcomcn on Tue Sep 25, 2012 6:29 pm, edited 1 time in total.
 #752  by tidus2728
 
Hi,

I used to have that error before.

Try to change this line from mail-service.xml:

<attribute name=\"JNDIName\">java:/Mail/OpenKM</attribute>

to

<attribute name=\"JNDIName\">java:/mail/OpenKM</attribute>

then edit

<property name=\"mail.smtp.host\" value=\"gmail.com\"/>

to

<property name=\"mail.smtp.host\" value=\"smtp.gmail.com\"/>

also change:

application.url=http://localhost:8080/OpenKM/es.git.ope ... /index.jsp

in the OpenKM.cfg where \"localhost\" is to be the IP Address or hostname of your server running OpenKM.

Then restart OpenKM.
 #780  by hbcomcn
 
Thanks for your help, but it still doesn\'t work, I couldn\'t get the email after I set mail notification.
Any other recommandation?
Thanks!!!
 #781  by hbcomcn
 
Hello, Still got such kind of error:

09:37:47,983 INFO [STDOUT] DEBUG: getProvider() returning javax.mail.Provider[T
RANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]
09:37:48,061 INFO [STDOUT] DEBUG SMTP: useEhlo true, useAuth false
09:37:48,061 INFO [STDOUT] DEBUG SMTP: trying to connect to host \"smtp.gmail.co
m\", port 25, isSSL false
09:38:08,994 ERROR [STDERR] javax.mail.MessagingException: Could not connect to
SMTP host: smtp.gmail.com, port: 25;
nested exception is:
java.net.ConnectException: Connection timed out: connect
09:38:08,994 ERROR [STDERR] at com.sun.mail.smtp.SMTPTransport.openServer(SM
TPTransport.java:1282)
09:38:08,994 ERROR [STDERR] at com.sun.mail.smtp.SMTPTransport.protocolConne
ct(SMTPTransport.java:370)
09:38:08,994 ERROR [STDERR] at javax.mail.Service.connect(Service.java:275)
09:38:08,994 ERROR [STDERR] at javax.mail.Service.connect(Service.java:156)
09:38:08,994 ERROR [STDERR] at javax.mail.Service.connect(Service.java:105)
09:38:08,994 ERROR [STDERR] at javax.mail.Transport.send0(Transport.java:168
)
09:38:08,994 ERROR [STDERR] at javax.mail.Transport.send(Transport.java:98)
09:38:09,009 ERROR [STDERR] at es.git.openkm.util.Mail.send(Mail.java:88)
09:38:09,025 ERROR [STDERR] at es.git.openkm.module.direct.DirectNotificatio
nModule.notify(DirectNotificationModule.java:279)
09:38:09,025 ERROR [STDERR] at es.git.openkm.api.OKMNotification.notify(OKMN
otification.java:87)
09:38:09,025 ERROR [STDERR] at es.git.openkm.frontend.server.OKMFileUploadSe
rvlet.doPost(OKMFileUploadServlet.java:139)
09:38:09,025 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpSe
rvlet.java:710)
09:38:09,025 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpSe
rvlet.java:803)
09:38:09,025 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterCha
in.internalDoFilter(ApplicationFilterChain.java:290)
09:38:09,025 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterCha
in.doFilter(ApplicationFilterChain.java:206)
09:38:09,025 ERROR [STDERR] at org.jboss.web.tomcat.filters.ReplyHeaderFilte
r.doFilter(ReplyHeaderFilter.java:96)
09:38:09,025 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterCha
in.internalDoFilter(ApplicationFilterChain.java:235)
09:38:09,025 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterCha
in.doFilter(ApplicationFilterChain.java:206)
09:38:09,025 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve
.invoke(StandardWrapperValve.java:230)
09:38:09,025 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve
.invoke(StandardContextValve.java:175)
09:38:09,025 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityAssocia
tionValve.invoke(SecurityAssociationValve.java:179)
09:38:09,025 ERROR [STDERR] at org.apache.catalina.authenticator.Authenticat
orBase.invoke(AuthenticatorBase.java:524)
09:38:09,025 ERROR [STDERR] at org.jboss.web.tomcat.security.JaccContextValv
e.invoke(JaccContextValve.java:84)
09:38:09,025 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.in
voke(StandardHostValve.java:127)
09:38:09,025 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.i
nvoke(ErrorReportValve.java:102)
09:38:09,025 ERROR [STDERR] at org.jboss.web.tomcat.service.jca.CachedConnec
tionValve.invoke(CachedConnectionValve.java:157)
09:38:09,025 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.
invoke(StandardEngineValve.java:109)
09:38:09,025 ERROR [STDERR] at org.apache.catalina.connector.CoyoteAdapter.s
ervice(CoyoteAdapter.java:262)
09:38:09,025 ERROR [STDERR] at org.apache.coyote.http11.Http11Processor.proc
ess(Http11Processor.java:844)
09:38:09,025 ERROR [STDERR] at org.apache.coyote.http11.Http11Protocol$Http1
1ConnectionHandler.process(Http11Protocol.java:583)
09:38:09,025 ERROR [STDERR] at org.apache.tomcat.util.net.JIoEndpoint$Worker
.run(JIoEndpoint.java:446)
09:38:09,025 ERROR [STDERR] at java.lang.Thread.run(Thread.java:595)
09:38:09,025 ERROR [STDERR] Caused by: java.net.ConnectException: Connection tim
ed out: connect
09:38:09,025 ERROR [STDERR] at java.net.PlainSocketImpl.socketConnect(Native
Method)
09:38:09,025 ERROR [STDERR] at java.net.PlainSocketImpl.doConnect(PlainSocke
tImpl.java:333)
09:38:09,025 ERROR [STDERR] at java.net.PlainSocketImpl.connectToAddress(Pla
inSocketImpl.java:195)
09:38:09,025 ERROR [STDERR] at java.net.PlainSocketImpl.connect(PlainSocketI
mpl.java:182)
09:38:09,025 ERROR [STDERR] at java.net.SocksSocketImpl.connect(SocksSocketI
mpl.java:366)
09:38:09,025 ERROR [STDERR] at java.net.Socket.connect(Socket.java:520)
09:38:09,025 ERROR [STDERR] at java.net.Socket.connect(Socket.java:470)
09:38:09,025 ERROR [STDERR] at com.sun.mail.util.SocketFetcher.createSocket(
SocketFetcher.java:232)
09:38:09,025 ERROR [STDERR] at com.sun.mail.util.SocketFetcher.getSocket(Soc
ketFetcher.java:189)
09:38:09,025 ERROR [STDERR] at com.sun.mail.smtp.SMTPTransport.openServer(SM
TPTransport.java:1250)
09:38:09,025 ERROR [STDERR] ... 31 more
09:38:09,134 INFO [CacheManager] resizeAll size=7
 #788  by tidus2728
 
Hi,

Sorry I forgot to check on google.

You can try to change the SMTP port that gmail uses in mail-service.xml:

<property name=\"mail.smtp.port\" value=\"25\"/>

to

<property name=\"mail.smtp.port\" value=\"465\"/>

or

<property name=\"mail.smtp.port\" value=\"587\"/>

If an error still occurs, try to send the complete server.log to trace the error.
 #793  by OpenKMFans
 
Hi, tidus.
i also don\'t understand what the user and password is for. Is it essential?

in my web-service.xml, there isn\'t \"java:/Mail/OpenKM\" but \"java:Mail/\" instead,
<attribute name=\"JNDIName\">java:/Mail</attribute>
as you see, what can i do?

I\'m a freshman and I like OpenKM, so I wish some guys gave a advice how to configure mail notification. Thanks.
 #796  by jllort
 
We\'ll hbcomcn I think the problem is on mail service provider, taking a look at log error:

09:37:48,061 INFO [STDOUT] DEBUG SMTP: trying to connect to host \"smtp.gmail.co
m\", port 25, isSSL false

When \"isSSL false\", really Jboss by default can\'t connect using ssl, tls, etc... if your mail service provider requires this king of autentication try to user other ( for example if you\'re on linux install postix on OpenKM server to mail service ) other solution is changing the mail provider that not need.

More complex, and I don\'t recoment is to install ssl, tls support for jboss, you cand find some information on jboss forum ( try to search google ), but is something so mystic, and I don\'t recomend that way.
 #797  by jllort
 
Hello OpenKMFans,

Almost \"user\" is essential, password depends on your mail configuration.

About web-service.xml , I don\'t understand what you\'re looking there ? , take I look on OpenKM support/Faq sections (section -> \"OpenKM is not sending mail notifications\") and on support/documentation to read how to configure mail service ( mail-service.xml on deploy jboss folder ).
 #826  by jllort
 
You must only define one user/password for mail service notification that is used as general user ( mail account ) that OpenKM uses to send mails.

user1 -> must be your gmail login name, probably \"hb.com.c\" or similar and pass2 your real gmail password.

At first must be deleted the lines:

<attribute name=\"user2\">user2</attribute>
<attribute name=\"pass2\">pass2</attribute>
<attribute name=\"Configuration\">
<configuration>
<property name=\"mail.transport.protocol\" value=\"smtp\"/>
<property name=\"mail.smtp.host\" value=\"smtp.gmail.com\"/>
<property name=\"mail.smtp.port\" value=\"587\"/>
<property name=\"mail.from\" value=\"hb.com.cn@gmail.com\"/>
<property name=\"mail.debug\" value=\"true\"/>
</configuration>
</attribute>

<attribute name=\"user3\">user3</attribute>
<attribute name=\"pass3\">pass3</attribute>
<attribute name=\"Configuration\">
<configuration>
<property name=\"mail.transport.protocol\" value=\"smtp\"/>
<property name=\"mail.smtp.host\" value=\"smtp.gmail.com\"/>
<property name=\"mail.smtp.port\" value=\"587\"/>
<property name=\"mail.from\" value=\"hb.com.cn@gmail.com\"/>
<property name=\"mail.debug\" value=\"true\"/>
</configuration>
</attribute>

About using gmail service or other, there\'s no problem if you can autenticate with basic mode ( plain ) but if you require ssl, tls or other kind is some quite complex to do it.
 #831  by tidus2728
 
Hi,

If you are running your OpenKM on a Windows XP machine, you can install the SMTP service in Control Panel, Add or Remove Programs, Add / Remove Windows Components, then under Internet Information Services. After you have successfully installed SMTP, set your mail-service.xml from:

<property name=\"mail.transport.protocol\" value=\"smtp\"/>
<property name=\"mail.smtp.host\" value=\"smtp.gmail.com\"/>
<property name=\"mail.smtp.port\" value=\"587\"/>

to

<property name=\"mail.transport.protocol\" value=\"smtp\"/>
<property name=\"mail.smtp.host\" value=\"xxx.xxx.xxx.xxx\"/>
<property name=\"mail.smtp.port\" value=\"25\"/>

where xxx.xxx.xxx.xxx is the private IP address of your machine running SMTP. This machine should have direct access to the internet to allow sending of your notifications.

Thanks.
 #834  by skowit
 
Hi.
If you want to use smtp.gmail.com, Gmail use TLS authentication.
Try to edit mail-service.xml :

<mbean code=\"org.jboss.mail.MailService\"
name=\"jbosservice=mail/OpenKM\">
<attribute name=\"JNDIName\">java:/mail/OpenKM</attribute>
<attribute name=\"User\">your-mail@gmail.com</attribute>
<attribute name=\"Password\">your-password</attribute>
<attribute name=\"Configuration\">
<configuration>
<property name=\"mail.transport.protocol\" value=\"smtp\"/>
<property name=\"mail.smtp.host\" value=\"smtp.gmail.com\"/>
<property name=\"mail.smtp.port\" value=\"587\"/>
<property name=\"mail.smtp.starttls.enable\" value=\"true\"/>
<property name=\"mail.smtp.auth\" value=\"true\"/>
<property name=\"mail.from\" value=\"your-mail@gmail.com\"/>
<property name=\"mail.debug\" value=\"false\"/>
</configuration>
</attribute>

I use this configuration,It\'s work :)
 #835  by OpenKMFans
 
thanks,all friends,my mail-notification works well right now, here is my mail-service.xml:
////////////////////////////////////
////////////////////////////////////
<server>

<!-- ==================================================================== -->
<!-- Mail Connection Factory -->
<!-- ==================================================================== -->

<mbean code=\"org.jboss.mail.MailService\"
name=\"jboss:service=mail/OpenKM\">
<attribute name=\"JNDIName\">java:/mail/OpenKM</attribute>
<attribute name=\"User\">MyOfficeMailName</attribute>
<attribute name=\"Password\">MyOfficeMailPassword</attribute>
<attribute name=\"Configuration\">
<!-- A test configuration -->
<configuration>
<!-- Change to your mail server prototocol -->
<property name=\"mail.store.protocol\" value=\"pop3\"/>
<property name=\"mail.transport.protocol\" value=\"smtp\"/>

<!-- Change to the user who will receive mail -->
<property name=\"mail.user\" value=\"nobody\"/>

<!-- Change to the mail server -->
<property name=\"mail.pop3.host\" value=\"pop3.nosuchhost.nosuchdomain.com\"/>

<!-- Change to the SMTP gateway server -->
<property name=\"mail.smtp.host\" value=\"XXX.XXX.XXX.XXX\"/>

<!-- The mail server port -->
<property name=\"mail.smtp.port\" value=\"25\"/>

<!-- Change to the address mail will be from -->
<property name=\"mail.from\" value=\"xxx@xxx.xxx\"/>

<!-- Enable debugging output from the javamail classes -->
<property name=\"mail.debug\" value=\"true\"/>
</configuration>
</attribute>
<depends>jboss:service=Naming</depends>
</mbean>

</server>

/////////////////////////////////////////////////////////
XXX.XXX.XXX.XXX is a smtp-server-ip in my company,

xxx@xxx.xxx is my office mail address, which is included in the openkm-emails.properties
 #837  by jllort
 
Thanks showit for posting this configuration,

I\'m happy to see that property mail.smtp.starttls.enable runs on mail-service.xml configuration.

I\'ve reviewed jboss wiki pages looking for java mail documentation because on older jboss releases I was trying to run mail service on tls configuration with bad results ( seems on older releases was needed to install other jboss module JbossMailService to support it, really not pleasant ) but your post helps me to look that\'s now possible to do ( on jboss 4.2.2 or upper ).

About Us

OpenKM is part of the management software. A management software is a program that facilitates the accomplishment of administrative tasks. OpenKM is a document management system that allows you to manage business content and workflow in a more efficient way. Document managers guarantee data protection by establishing information security for business content.