Skip to content
Other versions

Loading…

Notification samples

On most methods you’ll see parameter named “nodeId”. The value of this parameter can be some valid document UUID or path.

Description:

Method Return values Description
notify(String nodeId, List users, List mails, String message, boolean attachment) void Send a mail notification.

Example:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using com.openkm.sdk4csharp;
using com.openkm.sdk4csharp.bean;
using System.IO;
namespace OKMRest
{
public class Program
{
static void Main(string[] args)
{
String host = "http://localhost:8080/OpenKM";
String username = "okmAdmin";
String password = "admin";
OKMWebservice ws = OKMWebservicesFactory.newInstance(host, username, password);
try
{
List<String> users = new List<String>(); users.Add("test"); List<String> mails = new List<String>(); mails.Add("test@none.com"); String message = "Body of the message"; ws.notify(nodeId, users, mails, message, false);
} catch (Exception e) {
System.Console.WriteLine(e.ToString());
}
}
}
}