SocketTools .NET Edition

InternetMail.ParseMessage Method 

Parse the specified string, adding the contents to the current message.

[Visual Basic]
Public Function ParseMessage( _
   ByVal messageText As String _
) As Boolean
[C#]
public bool ParseMessage(
   string messageText
);

Parameters

messageText
A string which contains the message text to be parsed.

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 ParseMessage method parses a string which contains message data, adding it to the current message. This method is useful when the application needs to parse an arbitrary block of text and add it to the current message. If the string contains header fields, the values will be added to the message header. Once the end of the header block is detected, all subsequent text is added to the body of the message.

Note that unlike the ImportMessage method, the ParseMessage method does not clear the contents of the current message and may be called multiple times. Use the ClearMessage method to clear the current message before calling ParseMessage if necessary.

See Also