Command Line Email Client for IBM Notes
Command Line Email Client for IBM Notes (also known as CLENotes and, in the past, NotesCLI) is a tool to access IBM Notes email from, you guessed it, the shell and command prompt. Functions include reading mail, sending mail, listing mail and searching mail and the main use case is to automate Notes email related tasks.
Latest release is available from OpenNTF: CLENotes@OpenNTF
- IBM Notes, v8 or later, client must be installed locally.
- IBM Domino as mail server.
- 32-bit Java 1.7 or later.
- PATH environment variable must include path to Java-executable.
CLENotes is tested with Windows but Linux and Mac should work too.
- The first thing to do is to add IBM Notes directory to system PATH environment variable. Otherwise, executing clenotes.cmd will give error: java.lang.UnsatisfiedLinkError: no nlsxbe in java.library.path so make sure that IBM Notes directory included in PATH.
- Unzip clenotes-VERSION.zip to a directory of your choosing.
- When executing CLENotes for the first time, the program checks Notes Java classes availability. If classes are not present, CLENotes asks to install them and tries to automatically find IBM Notes Java classes by searching commonly used Notes installation directories and then extracting it's contents to classes-directory. If CLENotes doesn't find Notes.jar, user is prompted for it's location.
- Windows: See the help using clenotes.cmd --help and start using the program.
- Linux and other platforms: clenotes.sh should work. Or open clenotes.cmd/.sh in a text editor to see the Java syntax and start using the program.
- In order to use clenotes from any directory, modify clenotes.cmd/.sh file and add installation path to classpath. For example:
java -classpath c:/path/to/clenotes/classes;c:/path/to/clenotes/lib/* clenotes.Main %*. Then add clenotes.cmd/.sh to PATH.
Linux and Mac
CLENotes works on Linux/Mac as long as both IBM Notes and Java are installed. However, making it work may require a bit more than uninstalling the zip-file.
- A very common error is: java.lang.UnsatisfiedLinkError: no nlsxbe in java.library.path
- This error is explained here: http://www-01.ibm.com/support/docview.wss?uid=swg21201491.
- Solution is to add java.library.path system property to java-command:
java -classpath /path/to/clenotes/classes;/path/to/clenotes/lib/* -Djava.library.path=/path/to/notes clenotes.Main %*.
- However, that may not work. This post http://www.lbenitez.com/2009/02/atlas-for-mac-is-here.html explains what was needed to run Notes app on Mac.
- Solution was to add export DYLD_LIBRARY_PATH=/path/to/notes to .profile.
- On Linux env variable is LD_LIBRARY_PATH and setting export LD_LIBRARY_PATH=/path/to/notes may be needed before running CLENotes.
clenotes.cmd [OPTIONS] [CMD [CMD-OPTIONS] [CMD ...] ]. See sample commands.
- today - Read todays mail.
- send - Send mail.
- search - Search mail.
- read - Read latest mail or specific mail when listing mail with today.
- list -List mail in mail database.
- maildbinfo - Show mail database information.
- notes-version - Show Notes, Java and OS version.
See full command line help using:
A few sample commands are here: src/files/samplecommands.md.
Starting from version 5.3, CLENotes has support for folders. There is global '--folder' option that is used to select folder and it is supported in today,list and search commands.
Notes/Domino does not use folder references by default. For the curious, these two support docs may be interesting: LotusScript FolderReferences property helps determine in which folders a document is stored and LotusScript FolderReferences property not populated when document is moved to folder
Note: maintaining folder references impacts performance.
Enable folder references
In order to use folders, you need to enable it. Enable it using this command:
clenotes.cmd dev --folderrefs --enable
This enables folder tracking for all future mails/documents. For all existing documents, folders are still not tracked.
Use this command to move all existing mails to their folders:
clenotes.cmd dev --folderrefs --putallinfolder
After folder references are enabled, mails can be listed or searched from specified folder. For example, following command searches all mails with subject 'January' from 'project'-folder:
clenotes.cmd --folder=project search --subject=January
To disable folder references, use this command:
clenotes.cmd dev --folderrefs --disable
Development is mostly done using Oracle Java, Windows and Eclipse IDE. Sources are built using Maven. In order to build CLENotes, location of Notes.jar must be either specified in pom.xml or NOTES_JAR_LOCATION environment variable must be pointed to Notes.jar location.
By default, starting maven build cleans existing build and then compiles and packages CLENotes to target-directory. Distribution file is clenotes-VERSION.zip.
CLENotes has been available for a long time, ever since 2002: