Retrieve a message from the current mailbox and store it in a
local file.
Syntax
object.StoreMessage( MessageNumber,
FileName )
Parameters
- MessageNumber
- Number of message to retrieve. This value must be greater than
zero. The first message in the mailbox is message number one.
- FileName
- A string which specifies the file that the message will be
stored in. If the file does not exist, it will be created. If the
file does exist, it will be overwritten with the contents of the
message.
Return Value
A value of zero is returned if the method succeeds.
Otherwise, a non-zero error code is returned which indicates the
cause of the failure.
Remarks
The StoreMessage method retrieves a message from the server
and stores it in a file on the local system. The contents of the
message is stored as a text file, using the specified file name. This
method will cause the current thread to block until the message
transfer completes, a timeout occurs or the transfer is canceled.
During the transfer, the OnProgress event will fire
periodically, enabling the application to update any user interface
objects such as a progress bar.
See Also
GetMessage Method,
OpenMessage Method
|