Sunday 5 August 2012

How to enable email/notification settings in OpenKM ( document management system)

We are using OpenKM as our knowledge management system. To enable notification/email generation we need to do only one change in xml file. We are using SMTP server as mail server.



1) go to

$JBOSS_HOME/server/default/deploy/mail-service.xml


2) Change only the highlighted portion with your mail server.

<?xml version="1.0" encoding="UTF-8"?>
<!-- $Id: mail-service.xml 62349 2007-04-15 16:48:15Z dimitris@jboss.org $ -->
<server>

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

  <mbean code="org.jboss.mail.MailService"
         name="jboss:service=Mail">
    <attribute name="JNDIName">java:/Mail</attribute>
    <attribute name="User">nobody</attribute>
    <attribute name="Password">password</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="176.12.12.43"/>

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

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

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

  <!-- OpenKM -->
  <mbean code="org.jboss.mail.MailService" name="jboss:service=OpenKM">
    <attribute name="JNDIName">java:/mail/OpenKM</attribute>
    <attribute name="User">nobody</attribute>
    <attribute name="Password">password</attribute>
    <attribute name="Configuration">
      <configuration>
        <property name="mail.transport.protocol" value="smtp"/>
        <property name="mail.smtp.host" value="176.12.12.43"/>
        <property name="mail.smtp.port" value="25"/>
        <property name="mail.from" value="embsystest@gmail.com"/>
        <property name="mail.debug" value="true"/>
      </configuration>
    </attribute>
    <depends>jboss:service=Naming</depends>
  </mbean>
</server>