ImapOpenMessage Function  
 
INT WINAPI ImapOpenMessage(
  HCLIENT hClient,  
  UINT nMessageId,  
  DWORD dwReserved  
);

The ImapOpenMessage function opens the specified message on the server.

Parameters

hClient
Handle to the client session.
nMessageId
Number of message to retrieve. This value must be greater than zero. The first message in the mailbox is message number one.
dwReserved
A reserved parameter. This value should always be zero.

Return Value

If the function succeeds, the return value is zero. If the function fails, the return value is IMAP_ERROR. To get extended error information, call ImapGetLastError.

Remarks

The ImapOpenMessage function uses the FETCH command to access the specified message on the server. The client can then use the the ImapRead function to read the contents 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.
Unicode: Implemented as Unicode and ANSI versions.

See Also

ImapCloseMessage, ImapGetMessage, ImapGetMessageHeaders, ImapOpenMessageEx, ImapRead, ImapStoreMessage