Page 1 of 1
Email Configuration from scratch.
PostPosted:Sun Dec 27, 2009 3:19 pm
by virii
Hi,
Can any one help me out in configuring email notification from scratch?
I want to receive an email when any file is added/deleted/modified etc. Currently I just want to do it on test basis, so I just want to receive a notification email at my email when some some action is performed on OpemKM.
Please help out with this basic configuration. Where can i find proper manual of using OpenKM?
Cooperation will be appreciated.
Virii
Re: Email Configuration from scratch.
PostPosted:Mon Dec 28, 2009 9:57 am
by jllort
Refer to faq section on this web, there's the way to configure it.
Re: Email Configuration from scratch.
PostPosted:Mon Dec 28, 2009 1:23 pm
by virii
Dear Jllort,
I could not find help regarding this in forum, even a guy posted : " Mail Notification configuration / reporting ", but no one replied to him.
I need GUI based way to configure email notifications. Can you please help me out here, i will be very thankful for this.
Waiting for Urgent response.
Re: Email Configuration from scratch.
PostPosted:Mon Dec 28, 2009 2:37 pm
by jllort
There's no GUI based way to configure it, I'll attach the FAQ refence for it:
Code: Select allBy default, mail notification is not enabled on OpenKM. It must be configured with parameters:
For versions older than OpenKM 3.0 you must create some properties file:
In $JBOSS_HOME/server/default/conf, there must be a file called emails.properties with user mail information like this:
user1=user1@mail.com
....
Setting the mail server on JBoss:
$JBOSS_HOME/server/default/deploy must have a file called mail-service.xml ( your SMTP mail server configuration goes here ). (Note: you have to change this sample values to meet your server settings.)
<!-- OpenKM -->
<mbean code="org.jboss.mail.MailService" name="jboss:service=mail/OpenKM">
<attribute name="JNDIName">java:/mail/OpenKM</attribute>
<attribute name="User">user</attribute>
<attribute name="Password">password</attribute>
<attribute name="Configuration">
<configuration>
<property name="mail.transport.protocol" value="smtp"/>
<property name="mail.smtp.host" value="host.com"/>
<property name="mail.smtp.auth" value="true"/>
<property name="mail.from" value="noreply@host.com"/>
<property name="mail.debug" value="false"/>
</configuration>
<depends>jboss:service=Naming</depends>
</attribute>
</mbean>
Enabling mailing service:
Your server URL must be inserted at OpenKM.cfg
application.url=http://your_host:8080/OpenKM/es.git.openkm.frontend.Main/index.jsp
YOU MUST RESTART THE OPENKM SERVICE AFTER CHANGING OPENKM.CFG
And this one to set notification configuration
Code: Select allyou can configure these text using two properties in the OpenKM.cfg file. Default values are shown below:
subscription.message.subject=OpenKM - {0} - {1};
subscription.message.body=<b>Document: </b><a href=\"{0}\">{1}</a><br/><b>User: </b>{3}<br/><b>Event: </b>{4}<br/>
And these are the substitution variables used:
SUBSCRIPTION SUBJECT
{0} - event type
{1} - document path
{2} - document name
SUBSCRIPTION BODY
{0} - document url
{1} - document path
{2} - document name
{3} - user id
{4} - event type
{5} - comment
notify.message.subject=OpenKM - NOTIFICATION - {0}
notify.message.body=<b>Document: </b><a href=\"{0}\">{1}</a><br/><b>User: </b>{3}<br/><b>Message: </b>{4}<br/>
And these are the substitution variables used:
NOTIFY SUBJECT
{0} - document path
{2} - document name
NOTIFY BODY
{0} - document url
{1} - document path
{2} - document name
{3} - user id
{4} - message
There's nothing else, with it you might configure and customize OpenKM mail service.
Re: Email Configuration from scratch.
PostPosted:Mon Dec 28, 2009 6:06 pm
by virii
Hi Jllort,
Thank you very much for your help! I try it....

Re: Email Configuration from scratch.
PostPosted:Tue Dec 29, 2009 9:26 am
by virii
Hi Jllort,
I have OpenKM 4.0 and did not find email.properties file in it..????? Is there any other method for doing this? (Email Configuration and Notifications)
Regards,
Re: Email Configuration from scratch.
PostPosted:Tue Dec 29, 2009 5:48 pm
by jllort
Email and users are in embeded database - the default openkm configuration - autheticate as okmAdmin and go to administration tools to add users and set there the user mail.
Any user in menu -> Tools / Preferences / User configuration can change their own values ( mail )
Re: Email Configuration from scratch.
PostPosted:Thu Dec 31, 2009 12:04 pm
by virii
This method is configure email address, but how to configure Notification when some File is added/deleted/modified etc...
Re: Email Configuration from scratch.
PostPosted:Thu Dec 31, 2009 6:42 pm
by jllort
OK, you're talking about subscription, you can subscribe to document or folder, you've got a button in tool bar for it. When you're subcribed to a folder any change in any document into folder or subfolders it'll be notified to you by mail. Is that ?
Re: Email Configuration from scratch.
PostPosted:Fri Jan 01, 2010 10:42 am
by virii
Yes it is so, but does not generate any notification.....
Re: Email Configuration from scratch.
PostPosted:Sat Jan 02, 2010 6:47 pm
by jllort
Something is wrong in your mail configuration. Set debug mode on to see what happens, sometimes mail could be detected as spam by your server depending how you've configured mail service in mail-service.xml
Remember to un comment in OpenKM:cfg the line
and restart jboss server to take it effects.