Example Code

Using LabVIEW to Send Email with Microsoft Outlook

Code and Documents

Attachment

This example uses Microsoft Outlook activeX objects to create a new message and then send that message using the Microsoft Outlook engine. The VI was developed and testing using Microsoft Outlook 2002, but most version of Microsoft Outlook should be compatible with the program.

Enter data into the To, Subject, and message controls on the front panel. The other controls, CC and BCC, are optional. When using multiple email addresses separate addresses with a semicolon.

Run the VI to send an email to the specified email address. If you have the E-mail security update installed with Microsoft Outlook 2002, you will be prompted to authorize the automated email and override the security warning. Click OK in the message box to send the email.

Note:
For truly automated messaging, you can override this warning message programmatically using third party software.

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

Contributors