Retrieve a message from the server.
Syntax
object.GetMessage( MessageNumber,
Message, [Options] )
Parameters
- MessageNumber
- Number of message to retrieve from the server. This value must
be greater than zero. The first message in the mailbox is message
number one and the last message can be determined by checking the
value of the LastMessage property.
- Message
- A string or byte array which will contain the data transferred
from the server when the method returns.
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 GetMessage method is used to retrieve a message from
the server and copy it into a local buffer. 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
DeleteMessage Method,
GetHeaders Method,
OpenMessage Method,
OnProgress Event
|