TPop3Cli.Retr

From Overbyte
Jump to navigation Jump to search

Main page -> ICS component reference -> TPop3Cli -> Retr

Definition

<syntaxhighlight lang="delphi"> procedure Retr; virtual; </syntaxhighlight>

Description

Sends RETR command to a POP3 server. This command is valid only during TRANSACTION state. It retrieves entire message from server. Message is retrieved using OnMessageBegin, OnMessageLine and OnMessageEnd events.

To specify which message you want to retrieve set MsgNum to a specific value prior to calling Retr().

Only after you've successfully retrieved message and after OnMessageEnd occurs you may safely send delete the message. The message however, won't be deleted before Quit is issued.

Delphi Example

<syntaxhighlight lang="delphi"> // Retrieves message 1 Pop3Cli.MsgNum := 1; Pop3Cli.Retr; </syntaxhighlight>

See List or Uidl for more comprehensive example. Also you can look for OverbyteIcsMailRcv1 demo included in ICS distribution package.

C++ Example

<syntaxhighlight lang="cpp"> // Retrieves message 1 Pop3Cli->MsgNum = 1; Pop3Cli->Retr(); </syntaxhighlight>

See List or Uidl for more comprehensive example. Also you can look for OverbyteIcsMailRcv1 demo included in ICS distribution package.