# Class TPOP3Send

Description | Hierarchy | Fields | Methods | Properties

## Unit

pop3send

## 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

- TObject
- TSynaClient
- TPOP3Send

## Overview

### Methods

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

### Properties

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

## Description

### Methods

| `constructor Create;`

| `destructor Destroy; override;`

| `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.

| `function Capability: Boolean;`

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

| `function Login: Boolean;`

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

| `function Logout: Boolean;`

Disconnects from POP3 server.

| `function Reset: Boolean;`

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

| `function NoOp: Boolean;`

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

| `function Stat: Boolean;`

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

| `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`.

| `function Retr(Value: Integer): Boolean;`

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

| `function RetrStream(Value: Integer; Stream: TStream): Boolean;`

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

| `function Dele(Value: Integer): Boolean;`

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

| `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`.

| `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`.

| `function StartTLS: Boolean;`

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

| `function FindCap(const Value: string): string;`

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

### Properties

| `property ResultCode: Integer read FResultCode;`

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

| `property ResultString: string read FResultString;`

Result string of last POP3 operation.

| `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.

| `property StatCount: Integer read FStatCount;`

After STAT command is there count of messages in inbox.

| `property StatSize: Integer read FStatSize;`

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

| `property ListSize: Integer read FListSize;`

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

| `property TimeStamp: string read FTimeStamp;`

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

| `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.

| `property AutoTLS: Boolean read FAutoTLS Write FAutoTLS;`

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

| `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!

| `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