Notification configuration parameters

When a user is subscribed to a document, any change in the document will be notified to by email. These email messages are created using some defined templates. These default templates to create messages can be adapted to your own style.

Field / PropertyTypeDescription

send.mail.from.user

Boolean

By default the application sends mail notifications setting the from mail field value as the user mail address. When this parameter is disabled it will use the default from mail address for all the mails sent by the application ( all mails sent by the application will have the same from mail address ).

When mail server have restricted to change the default from mail field ( for example when is not allowed to use general@mail.com account to send a mail with from mail field value user@mail.com , usually this kind of mail server configuration is set to prevent spam) then this parameter must be set as "false".

true

notification.message.subject

Text

Subject of the message sent when a user has chosen notify something to other.

OpenKM - NOTIFICATION

notification.message.body

HTML

Body of the message sent when a user has chosen notify something to other.

ReplaceMessage: ${notificationMessage}

User: ${userId}

<#list documentList as doc>Document: ${doc.path}

subscription.message.subject

Text

 Subject of the message sent automatically caused by some event. That happens because the user is subscribed to some node.

OpenKM - ${eventType} - ${documentPath}

subscription.message.body

HTML

Body of the message sent automatically caused by some event. That happens because user is subscribed to some node.

Date: ${eventDate?string("yyyy-MM-dd HH:mm:ss")}

Document: ${documentPath}

User: ${userId}

Event: ${eventType}

Comment: ${subscriptionComment}

task.message.subject

Text

Subject of the message sent when there's some change on task assigned to a user.

OpenKM - Task Manager Notification: ${message}

task.message.body

HTML

Body of the message sent when there's some change on task assigned to a user.

Task: ${tasksubject}

Start: ${taskstart!}

End: ${taskend!}

Project: ${taskproject!}

Status: ${taskstatus!}

Note: ${tasknote!}

notify.twitter.status

Text

This is the text used in the notification twitter message.

OpenKM - ${documentUrl} - ${documentPath} - ${userId} - ${eventType}     Edit   Delete

notify.twitter.user

String

Twitter account username.

notify.twitter.password

String

Twitter account password.

download.message.body

HTML

Body of the message sent when a user share some document to other for downloading.

Your archive is ready. Please download from ${url}

download.message.subject

String

 Subject of the message sent when a user share some document to other for downloading.

OpenKM - DOWNLOAD

download.token.validity

Integer

Range of days while the download url will be available.

7

template.message.body

String

Set the basic template for all notifications.

<div style="margin: 0; padding: 0; width: 100%; min-height: 100%;">
<table style="height: 100%; width: 100%;" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td style="background: #e5e5e5;" valign="top">
<table style="margin: 20px auto 0 auto; width: 600px;" border="0" width="100%" cellspacing="0" cellpadding="0" align="center">
<tbody>
<tr style="background: #e5e5e5;">
<td valign="top">
<div style="background: #fff;">
<table width="100%" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td>
<table width="100%" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td bgcolor="#018ca9" width="100%" height="6px">&nbsp;</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td>
<div style="border-top: solid 1px #88888b; min-height: 5px; max-height: 10px; width: 100%;">&nbsp;</div>
</td>
</tr>
<tr>
<td style="padding: 0 10px 10px 10px;">
<div>
<p>${body}</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</td>
</tr>
<tr>
<td style="background: #88888b;">
<table style="width: 100%;" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td height="4">&nbsp;</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td style="background: #222222; padding: 10px 20px;">
<table style="width: 100%;" border="0" cellspacing="5" cellpadding="0">
<tbody>
<tr>
<td>
<h3 style="color: #f6a81a; font: 18px verdana, arial, sans-serif; margin: 0; padding: 0;">OpenKM Knowledge Management</h3>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>

notification.url

String

The notification URL parameter is the template URL what  is used by OpenKM for building the direct access URL to the OpenKM nodes ( document, folders, emails, records ).

http://localhost:8080/openkm/index

Substitutions

For notification.message.body property:

  • ${documentUrl} or ${docUrl} shows the node URL..
  • ${documentPath} or ${docPath} shows the node path.
  • ${documentName} or ${docName} show the node name.
  • ${userName} show the user name who caused the event.
  • ${userId} show the user id who caused the action.
  • ${notificationMessage} show the notification message

For task.message.body property:

  • ${tasksubject} show the subject of the task.
  • ${taskstart} show when task started.
  • ${taskend} show when task ended.
  • ${taskproject} the task project.
  • ${taskstatus} indicate the status of the task.
  • ${tasknote} show the notes.

FreeMarker does not allow you to render null values (will throw an exception). If you expect a value to be null you can also use the ! operator: ${content.title!}. This is the equivalent to ${content.title!}.

More information at: