ImapGetMessageParts Function  
 
INT WINAPI ImapGetMessageParts(
  HCLIENT hClient,  
  UINT nMessageId  
);

The ImapGetMessageParts function returns the number of parts in a MIME multipart message on the server.

Parameters

hClient
Handle to the client session.
nMessageId
Number of message to retrieve the part count for. This value must be greater than zero. The first message in the mailbox is message number one.

Return Value

If the function succeeds, the return value is the number of parts in the specified message. If the function fails, the return value is IMAP_ERROR. To get extended error information, call ImapGetLastError.

Remarks

The ImapGetMessageParts function can be used to determine if a message on the server contains multiple parts. A multipart MIME message typically contains file attachments or multiple representations of the message, such as a version of the message in plain text and another using HTML markup.

If the function returns a value of one, then the message does not contain multiple parts and is a standard RFC822 formatted message. A value greater than one indicates that the message does have multiple parts. The ImapGetMessageEx function may be used to retrieve the data for a specific part of the message.

Requirements

Client: Requires Windows 7, Windows Vista or Windows XP.
Server: Requires Windows Server 2008 or Windows Server 2003.
Header: Include cstools7.h.
Library: Use csmapav7.lib.

See Also

ImapGetHeaderValue, ImapGetMessage, ImapGetMessageHeaders, ImapGetMessageId, ImapGetMessageSender