Catalyst Internet Mail .NET

InternetMail.GetMessage Method (Int32)

Retrieve a message from the server and replace the current message with its contents.

[Visual Basic]
Overloads Public Function GetMessage( _
   ByVal messageId As Integer _
) As Boolean
[C#]
public bool GetMessage(
   int messageId
);

Parameters

messageId
Number of article to retrieve from the server. This value must be greater than zero. The first message in the mailbox is message number one.

Return Value

This method returns a boolean value. If the method succeeds, the return value is true. If the method fails, the return value is false. To get extended error information, check the value of the LastError property.

Remarks

The GetMessage method is used to retrieve the specified message from the server and replace the current message with its contents. 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.

The current message number is specified by the value of the Message property.

See Also

InternetMail Class | SocketTools Namespace | InternetMail.GetMessage Overload List