This is an example of a custom database driver which exports any note(s) as a MIME file.

To use this code, simply place ndbmime.dll into the Notes/Domino program directory. If the code will be running client-side, the DLL must be on each user's machine who will be executing the code, otherwise they'll receive an error message. If the code will be running on the server-side, the DLL must be placed in the Domino program directory. Additionally, the ndbmime.sym file should be placed in the program directory as well. This file is used by NSD in the event of a Notes crash, to help identify exactly where the code faulted.




To convert a note to MIME, simply call the code like this:

@DbCommand("mime" : "NoCache" ; "ConvertToMime" ; "<Server>" : "<FilePath>" ; "<NOTEID 1>" : "<NOTEID 2>" ; "<File path 1>" : "<File path 2>" )

Here's a break down of the options:

  • "mime" Specifies which database driver to use
  • "NoCache" Doesn't use caching for the call
  • "ConvertToMime" The action to perform. This is the only action the database driver currently supports.
  • "<Server>" The Domino server's name, or "" if running on a local database. i.e. Server/Cert
  • "<FilePath>" The path to the database, i.e. s_dir\SupplyDb.nsf
  • "<NOTEID 1>" This is a list of either note IDs or UNIDs. Each note ID or UNID specified in the list will be converted to MIME and written to disk. The note doesn't actually get updated in the database.
  • "<File path 1>" This is a list of file paths to write the MIME to. i.e. c:\temp\note.eml
                    NOTE 1: any backslash characters need to be escaped with a backslash as shown here.<br/>
                    NOTE 2: Each file should use the .eml file extension.  This is the typical file format for MIME messages.<br/>
                    NOTE 3: This should be a list of file paths.  Each file path in the list correlates to the NOTE ID or UNID in the prior list.  i.e. the first NOTE ID in the list will use &lt;File path 1&gt; as the path to write the MIME to.<br/>



  • A notes.ini setting can be enabled, dbmime_enable_logging=1. This enables logging for the database driver. Log statements will be written to a file named dbmime.log in the data directory.

  • The files in the src directory are the source for this database driver. It was built using Visual Studio 2005. It also requires the Notes C API version 7.0.2 or higher to compile.

  • The 'save as mime.lss' file contains some LotusScript which can be placed in an action button in a view. The code will convert the selected notes to MIME.

    Timothy Parsons is the developer. Niklas Heidloff only committer.