Class TPOP3Send

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TPOP3Send = class(TSynaClient)

Description

Implementation of POP3 client protocol.

Note: Are you missing properties for setting Username and Password? Look to parent TSynaClient object!

Are you missing properties for specify server address and port? Look to parent TSynaClient too!

Hierarchy

Overview

Methods

Public constructor Create;
Public destructor Destroy; override;
Public function CustomCommand(const Command: string; MultiLine: Boolean): boolean;
Public function Capability: Boolean;
Public function Login: Boolean;
Public function Logout: Boolean;
Public function Reset: Boolean;
Public function NoOp: Boolean;
Public function Stat: Boolean;
Public function List(Value: Integer): Boolean;
Public function Retr(Value: Integer): Boolean;
Public function RetrStream(Value: Integer; Stream: TStream): Boolean;
Public function Dele(Value: Integer): Boolean;
Public function Top(Value, Maxlines: Integer): Boolean;
Public function Uidl(Value: Integer): Boolean;
Public function StartTLS: Boolean;
Public function FindCap(const Value: string): string;

Properties

Published property ResultCode: Integer read FResultCode;
Published property ResultString: string read FResultString;
Published property FullResult: TStringList read FFullResult;
Published property StatCount: Integer read FStatCount;
Published property StatSize: Integer read FStatSize;
Published property ListSize: Integer read FListSize;
Published property TimeStamp: string read FTimeStamp;
Published property AuthType: TPOP3AuthType read FAuthType Write FAuthType;
Published property AutoTLS: Boolean read FAutoTLS Write FAutoTLS;
Published property FullSSL: Boolean read FFullSSL Write FFullSSL;
Published property Sock: TTCPBlockSocket read FSock;

Description

Methods

Public constructor Create;
 
Public destructor Destroy; override;
 
Public function CustomCommand(const Command: string; MultiLine: Boolean): boolean;

You can call any custom by this method. Call Command without trailing CRLF. If MultiLine parameter is True, multilined response are expected. Result is True on sucess.

Public function Capability: Boolean;

Call CAPA command for get POP3 server capabilites. note: not all servers support this command!

Public function Login: Boolean;

Connect to remote POP3 host. If all OK, result is True.

Public function Logout: Boolean;

Disconnects from POP3 server.

Public function Reset: Boolean;

Send RSET command. If all OK, result is True.

Public function NoOp: Boolean;

Send NOOP command. If all OK, result is True.

Public function Stat: Boolean;

Send STAT command and fill StatCount and StatSize property. If all OK, result is True.

Public function List(Value: Integer): Boolean;

Send LIST command. If Value is 0, LIST is for all messages. After successful operation is listing in FullResult. If all OK, result is True.

Public function Retr(Value: Integer): Boolean;

Send RETR command. After successful operation dowloaded message in FullResult. If all OK, result is True.

Public function RetrStream(Value: Integer; Stream: TStream): Boolean;

Send RETR command. After successful operation dowloaded message in Stream. If all OK, result is True.

Public function Dele(Value: Integer): Boolean;

Send DELE command for delete specified message. If all OK, result is True.

Public function Top(Value, Maxlines: Integer): Boolean;

Send TOP command. After successful operation dowloaded headers of message and maxlines count of message in FullResult. If all OK, result is True.

Public function Uidl(Value: Integer): Boolean;

Send UIDL command. If Value is 0, UIDL is for all messages. After successful operation is listing in FullResult. If all OK, result is True.

Public function StartTLS: Boolean;

Call STLS command for upgrade connection to SSL/TLS mode.

Public function FindCap(const Value: string): string;

Try to find given capabily in capabilty string returned from POP3 server by CAPA command.

Properties

Published property ResultCode: Integer read FResultCode;

Result code of last POP3 operation. 0 - error, 1 - OK.

Published property ResultString: string read FResultString;

Result string of last POP3 operation.

Published property FullResult: TStringList read FFullResult;

Stringlist with full lines returned as result of POP3 operation. I.e. if operation is LIST, this property is filled by list of messages. If operation is RETR, this property have downloaded message.

Published property StatCount: Integer read FStatCount;

After STAT command is there count of messages in inbox.

Published property StatSize: Integer read FStatSize;

After STAT command is there size of all messages in inbox.

Published property ListSize: Integer read FListSize;

After LIST 0 command size of all messages on server, After LIST x size of message x on server

Published property TimeStamp: string read FTimeStamp;

If server support this, after comnnect is in this property timestamp of remote server.

Published property AuthType: TPOP3AuthType read FAuthType Write FAuthType;

Type of authorisation for login to POP3 server. Dafault is autodetect one of possible authorisation. Autodetect do this:

If remote POP3 server support APOP, try login by APOP method. If APOP is not supported, or if APOP login failed, try classic USER+PASS login method.

Published property AutoTLS: Boolean read FAutoTLS Write FAutoTLS;

If is set to True, then upgrade to SSL/TLS mode if remote server support it.

Published property FullSSL: Boolean read FFullSSL Write FFullSSL;

SSL/TLS mode is used from first contact to server. Servers with full SSL/TLS mode usualy using non-standard TCP port!

Published property Sock: TTCPBlockSocket read FSock;

Socket object used for TCP/IP operation. Good for seting OnStatus hook, etc.


Generated by PasDoc 0.9.0 on 2012-04-23 21:38:51