Topic Path: Symbol Reference > Classes > TIdPOP3 Class > TIdPOP3 Methods > RetrieveMsgSize Method
TIdPOP3.RetrieveMsgSize Method

Gets the size of a message in the mailbox.

function RetrieveMsgSize(
    const MsgNum: Integer
): Integer;
Message number to examine. 

Integer - Number of bytes in the message.

RetrieveMsgSize is an Integer function that retrieves the size of the message specified in MsgNum in the POP3 mailbox. 

The return value for RetrieveMsgSize is expressed in bytes, and may contain -1 if an error occurs wile trying to access the mailbox or the specified message number on the POP3 server. 

RetrieveMsgSize executes the POP3 LIST command with the message number identified in MsgNum. RetrieveMsgSize will extract the numeric message size from the text returned in the LastCmdResult property, or -1 when a server or a protocol error is encountered.

Copyright 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.