AppendMessage Method  
 

Append text to the current message being composed.

Syntax

object.AppendMessage( Message, [Options] )

Parameters

Message
A string or byte array which will contain the article to be posted to the server.
Options
An optional integer value which specifies one or more options. This argument is reserved for future use and should be omitted.

Return Value

A value of zero is returned if the operation was successful, otherwise a non-zero error code is returned which indicates the cause of the failure.

Remarks

The AppendMessage method appends the specified text to the current message. This method will cause the current thread to block until the article 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.

This method is useful for composing a message where the application needs to dynamically create the header, followed by a large amount of text. The message contents should be text, with each line terminated with a carriage return and linefeed character. Not all mail servers support sending 8-bit characters, so the message contents may need to be encoded if it uses anything other than standard US ASCII. To append binary data, it must be encoded using either the uucode or base64 (MIME) algorithms. It is recommended that you use the Mail Message control to handle file attachments and other complex message types.

See Also

AddRecipient Method, CloseMessage Method, CreateMessage Method