Mail level API

The GetMailBodyLength gets the size of the text part of the specified mail message.

Delphi syntax:

function GetMailBodyLength (Handle: TMailboxHandle; FolderNumber, MailNumber: dword; var Len: Int64): dword;

C++ syntax:

DWORD WINAPI GetMailBodyLength (DWORD Handle, DWORD FolderNumber, DWORD MailNumber, LONGLONG * Len);

C# syntax:

public static extern int GetMailBodyLength (int boxHandle, int FolderNumber, int MailNumber, out Int64 Len);



Handle of previously opened mailbox.


Number of the folder with the mail.


Specifies an ordinal number of a mail message inside the folder.


Out parameter that receives message body length.

Return Values:
Return the size of the text part of the mail message in Len parameter.

On success return OMS_OK or Error Code if fails.


Use with GetMailBody API to obtain a size of memory to allocate for holding mail body.


See Also:

GetMailBody, OpenMailbox, GetFolderCount, GetFolderProp




AIRMail SDK Team 2005-2008, please contact as