MessageSave API

Overview

MessageSave offers an API enabling external scripts to be invoked on every saved message. This API significantly simplifies the task of processing email messages. No longer do you have to write code to iterate over Outlook folders and messages. You can develop a simple script, which acts on a single message and MessageSave will do the heavy lifting.

API Description

MessageSave passes two types of information to the scripts:

  1. File name of the saved message. It is passed as the first and only command line argument to the script.
  2. Additional information about the message, passed in environment variables.
Environment variable name Description
TH_SENDER_EMAIL_ADDRESS Message sender email address
TH_SENDER_NAME Message sender name
TH_SUBJECT Message subject
TH_NORMALIZED_SUBJECT Normalized message subject
TH_HASATTACH "Y" if the message has attachments, "N" otherwise.
TH_MESSAGE_ID Message ID
TH_FOLDER_PATH Folder name.

How to invoke your script

In order to have MessageSave invoke your script, simply enter the full path to the script in the Execute field of the MessageSave dialog. Please see the User Guide for details on MessageSave options.

Note: If you use a script to write to a CSV file, please keep in mind that if you open the file in Excel, Excel will lock it and your script will not be able to write to it. Be sure to close Excel before running scripts.

Examples

Extract sender names and email addresses from your mailbox

This script creates a comma-separated value (CSV) list of names and email addresses of senders for all messages in your mailbox.

File format:
"Sender name", "Sender email address"

exec_sender_list_csv.vbs

Create a list of messages in your mailbox

This script creates a comma-separated value (CSV) list of messages in your mailbox.

File format:
"Sender name", "Sender email address", "Subject", "Has Attachment", "Date", "Time", "Message ID"

exec_message_list_csv.vbs

Save all messages in a single file

Core MessageSave functionality saves every message in its own file. With this simple script, you can save all messages together in a single file. Use it with TXT and EML formats.

exec_all_messages_one_file.vbs

Convert Outlook messages to mbox format

Note: MessageSave supports MBOX format natively. This script is provided as an illustration of the MessageSave API.

This simple script can convert Outlook messages or folders to mbox format used by email clients, such as Mozilla Thunderbird.

exec_outlook_to_mbox.vbs

The script saves the mbox file as c:\outlook.mbox.

We'd love to hear from you

With the sample scripts above, we have just scratched the surface of what custom MessageSave scripts are able to do. If you have ideas for new scripts, or if you have developed a script and would like to share it with other MessageSave users, please let us know.

Thank you for using MessageSave!

BUY NOW Order MessageSave
RISK-FREE today

Questions? Call us at
1.415.354.9711


FREE TRIAL Download 30 DAY
RISK-FREE TRIAL.

(Download size is only 400KB)


"It's a great product! It will help us archive our e-mail with each project, and keep it together with all that project's drawings, documents and other electronic files."
- Rich M.
MORE USER TESTIMONIALS