Catalyst Internet Mail .NET

InternetMail.DeletePart Method 

Delete the specified message part from the current message.

[Visual Basic]
Public Function DeletePart( _
   ByVal messagePart As Integer _
) As Boolean
[C#]
public bool DeletePart(
   int messagePart
);

Parameters

messagePart
An integer which specifies the message part.

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

This method cannot be used to delete part zero, which is the main body of the message. Instead use the ClearMessage method to clear the contents of the entire message.

The number of message parts in the current message is returned by the PartCount property.

See Also

InternetMail Class | SocketTools Namespace