From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Example Code

Retrieve E-mails from IBM Lotus Notes (with LabVIEW)

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

Code and Documents

Attachment

Download All

Overview

Programmatically acquire e-mails from outside IBM Lotus Notes. 

 

Description

Through the use of ActiveX, this VI can retrieve the bodies of all emails within your Lotus Notes client from a particular sender. This was not possible by direct communication with the database file due to the custom format used by IBM. You can flick through the retrieved emails by simply using the array increment/decrement element buttons. It's not the nicest looking UI, but it's a good starting point for anyone wishing to retrieve data from Lotus Notes documents.

The VI has some code within it to locate the Lotus Notes .nsf database file which should be present on your computer when LN is installed, so all you need to do is enter your login password and the program will be able to access it. (Please view the source code first if you are uncomfortable entering your password into an unknown program


N.B.

  • The program will perform best when your Lotus Notes documents are search indexed.
  • Blank email bodies will still be retrieved.
  • Calendar event documents which contain no body will be returned as blank entries.

If you wish to develop further Lotus Notes applications using ActiveX, there is some documentation on the IBM website for the Java API's which often correlates, at least in function name, to some of the ActiveX calls.


Requirements

  • LabVIEW 2012 (or compatible)
  • IBM Lotus Notes

 

Steps to Implement or Execute Code

  1. Open MainLN.vi
  2. On the front panel, enter your login password.
  3. Enter the alias of the sender you wish to retrieve the mail for
  4. Press enter or click 'Retrieve'
  5. View the retrieved mail by clicking through the string array

 

Additional Information or References

Front Panel

Front Panel.png

 

VI Snippet

147.png

 

**This document has been updated to meet the current required format for the NI Code Exchange.**   

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Comments
TimmTheEnchanter
NI Employee (retired)
on

You have no idea how glad I am you posted this.  You've saved me countless hours.  Thanks!

National Instruments