The StoreMessage method provides a method of retrieving and
storing a message on the local system. The contents of the message is
stored as a text file, using the specified file name. This method
always causes the caller to block until the entire message has been
retrieved, even if the client has been put in asynchronous mode.
If event handling is enabled, the IMAP_EVENT_PROGRESS event will
fire periodically during the transfer of the message to the local
system. An application can determine how much of the message has been
retrieved by calling the GetTransferStatus method.
To retrieve the message into a global memory buffer so that it can
be passed to the MIME or SMTP libraries, use the GetMessage
method.