Topic Path: Symbol Reference > Classes > TIdPOP3 Class > TIdPOP3 Methods > Retrieve Method
ContentsIndexHome
PreviousUpNext
TIdPOP3.Retrieve Method

Retrieves a message from the POP3 mailbox by its message number.

function Retrieve(
    const MsgNum: Integer; 
    AMsg: TIdMessage
): Boolean;
Parameters 
Description 
MsgNum 
Message number to retrieve from the server.
 
AMsg 
Message instance where the retrieved values will be stored. 

Boolean - True on success.

Retrieve is a Boolean function that retrieves the message with the message number specified in MsgNo, and stores the result in the TIdMessage instance specified by AMsg. The message in AMsg is cleared prior top reading values the mailbox for the POP3 account. 

Retrieve executes the POP3 RETR command for the specified message number, and checks for the ST_OK response from the server prior to processing the contents of the message. 

Retrieve reads both the message headers and the message body (and optional attachments) into AMsg. 

Retrieve sets the return value for the method to True if no exception is raised during the method and the server response contains ST_OK.

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