ExportMessage Method

Export the current message to a text file.

Syntax

object.ExportMessage( FileName [, Options] )

The ExportMessage method syntax has the following parts:

Part Description
object An object expression that evaluates to an InternetMail object.
filename A string which specifies the name of the file to contain the message.
options A long integer which specifies one or more options.

Return Type

Integer

Settings

The settings for Options are:

Value Constant Description
256 mailOptionAllHeaders Preserves all headers in the message when it is exported, including the Received and Return-Path headers which are normally excluded.
512 mailOptionKeepOrder Preserves the order of the headers when it is exported; by default, some headers may be re-ordered.

Remarks

The ExportMessage copies the current message to the specified file. If the file does not exist it will be created, otherwise it will be overwritten with the contents of the message.

This method will return a value of zero if the action was successful. Otherwise, a non-zero error code is returned which indicates the cause of the failure.

See Also

ExtractFile Method, ImportMessage Method


Copyright © 2008 Catalyst Development Corporation. All rights reserved.