SocketTools .NET Edition

InternetMail.CreatePart Method (String, MimeCharacterSet, MimeEncoding)

Create a new message part in a multipart message.

[Visual Basic]
Overloads Public Function CreatePart( _
   ByVal messageText As String, _
   ByVal characterSet As MimeCharacterSet, _
   ByVal encodingType As MimeEncoding _
) As Boolean
[C#]
public bool CreatePart(
   string messageText,
   MimeCharacterSet characterSet,
   MimeEncoding encodingType
);

Parameters

messageText
A string argument which specifies the body of the new message part. Each line of text contained in the string should be terminated with a carriage-return/linefeed (CRLF) pair, which is recognized as the end-of-line.
characterSet
A MimeCharacterSet enumeration value which specifies the character set to use when composing the message.
encodingType
A MimeEncoding enumeration value which specifies the encoding type to use when composing the message.

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 CreatePart method creates a new message part. If the current message is a simple RFC822 formatted message, then this method converts it to a MIME multipart message. The current message part will be set to the new part that was just created.

See Also