Class TIMAPSend

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TIMAPSend = class(TSynaClient)

Description

Implementation of IMAP4 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 IMAPcommand(Value: string): string;
Public function IMAPuploadCommand(Value: string; const Data:TStrings): string;
Public function Capability: Boolean;
Public function Login: Boolean;
Public function Logout: Boolean;
Public function NoOp: Boolean;
Public function List(FromFolder: string; const FolderList: TStrings): Boolean;
Public function ListSearch(FromFolder, Search: string; const FolderList: TStrings): Boolean;
Public function ListSubscribed(FromFolder: string; const FolderList: TStrings): Boolean;
Public function ListSearchSubscribed(FromFolder, Search: string; const FolderList: TStrings): Boolean;
Public function CreateFolder(FolderName: string): Boolean;
Public function DeleteFolder(FolderName: string): Boolean;
Public function RenameFolder(FolderName, NewFolderName: string): Boolean;
Public function SubscribeFolder(FolderName: string): Boolean;
Public function UnsubscribeFolder(FolderName: string): Boolean;
Public function SelectFolder(FolderName: string): Boolean;
Public function SelectROFolder(FolderName: string): Boolean;
Public function CloseFolder: Boolean;
Public function StatusFolder(FolderName, Value: string): integer;
Public function ExpungeFolder: Boolean;
Public function CheckFolder: Boolean;
Public function AppendMess(ToFolder: string; const Mess: TStrings): Boolean;
Public function DeleteMess(MessID: integer): boolean;
Public function FetchMess(MessID: integer; const Mess: TStrings): Boolean;
Public function FetchHeader(MessID: integer; const Headers: TStrings): Boolean;
Public function MessageSize(MessID: integer): integer;
Public function CopyMess(MessID: integer; ToFolder: string): Boolean;
Public function SearchMess(Criteria: string; const FoundMess: TStrings): Boolean;
Public function SetFlagsMess(MessID: integer; Flags: string): Boolean;
Public function GetFlagsMess(MessID: integer; var Flags: string): Boolean;
Public function AddFlagsMess(MessID: integer; Flags: string): Boolean;
Public function DelFlagsMess(MessID: integer; Flags: string): Boolean;
Public function StartTLS: Boolean;
Public function GetUID(MessID: integer; var UID : Integer): Boolean;
Public function FindCap(const Value: string): string;

Properties

Published property ResultString: string read FResultString;
Published property FullResult: TStringList read FFullResult;
Published property IMAPcap: TStringList read FIMAPcap;
Published property AuthDone: Boolean read FAuthDone;
Published property UID: Boolean read FUID Write FUID;
Published property SelectedFolder: string read FSelectedFolder;
Published property SelectedCount: integer read FSelectedCount;
Published property SelectedRecent: integer read FSelectedRecent;
Published property SelectedUIDvalidity: integer read FSelectedUIDvalidity;
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 IMAPcommand(Value: string): string;

By this function you can call any IMAP command. Result of this command is in adequate properties.

Public function IMAPuploadCommand(Value: string; const Data:TStrings): string;

By this function you can call any IMAP command what need upload any data. Result of this command is in adequate properties.

Public function Capability: Boolean;

Call CAPABILITY command and fill IMAPcap property by new values.

Public function Login: Boolean;

Connect to IMAP server and do login to this server. This command begin session.

Public function Logout: Boolean;

Disconnect from IMAP server and terminate session session. If exists some deleted and non-purged messages, these messages are not deleted!

Public function NoOp: Boolean;

Do NOOP. It is for prevent disconnect by timeout.

Public function List(FromFolder: string; const FolderList: TStrings): Boolean;

Lists folder names. You may specify level of listing. If you specify FromFolder as empty string, return is all folders in system.

Public function ListSearch(FromFolder, Search: string; const FolderList: TStrings): Boolean;

Lists folder names what match search criteria. You may specify level of listing. If you specify FromFolder as empty string, return is all folders in system.

Public function ListSubscribed(FromFolder: string; const FolderList: TStrings): Boolean;

Lists subscribed folder names. You may specify level of listing. If you specify FromFolder as empty string, return is all subscribed folders in system.

Public function ListSearchSubscribed(FromFolder, Search: string; const FolderList: TStrings): Boolean;

Lists subscribed folder names what matching search criteria. You may specify level of listing. If you specify FromFolder as empty string, return is all subscribed folders in system.

Public function CreateFolder(FolderName: string): Boolean;

Create a new folder.

Public function DeleteFolder(FolderName: string): Boolean;

Delete a folder.

Public function RenameFolder(FolderName, NewFolderName: string): Boolean;

Rename folder names.

Public function SubscribeFolder(FolderName: string): Boolean;

Subscribe folder.

Public function UnsubscribeFolder(FolderName: string): Boolean;

Unsubscribe folder.

Public function SelectFolder(FolderName: string): Boolean;

Select folder.

Public function SelectROFolder(FolderName: string): Boolean;

Select folder, but only for reading. Any changes are not allowed!

Public function CloseFolder: Boolean;

Close a folder. (end of Selected state)

Public function StatusFolder(FolderName, Value: string): integer;

Ask for given status of folder. I.e. if you specify as value 'UNSEEN', result is number of unseen messages in folder. For another status indentificator check IMAP documentation and documentation of your IMAP server (each IMAP server can have their own statuses.)

Public function ExpungeFolder: Boolean;

Hardly delete all messages marked as 'deleted' in current selected folder.

Public function CheckFolder: Boolean;

Touch to folder. (use as update status of folder, etc.)

Public function AppendMess(ToFolder: string; const Mess: TStrings): Boolean;

Append given message to specified folder.

Public function DeleteMess(MessID: integer): boolean;

'Delete' message from current selected folder. It mark message as Deleted. Real deleting will be done after sucessfull CloseFolder or ExpungeFolder

Public function FetchMess(MessID: integer; const Mess: TStrings): Boolean;

Get full message from specified message in selected folder.

Public function FetchHeader(MessID: integer; const Headers: TStrings): Boolean;

Get message headers only from specified message in selected folder.

Public function MessageSize(MessID: integer): integer;

Return message size of specified message from current selected folder.

Public function CopyMess(MessID: integer; ToFolder: string): Boolean;

Copy message from current selected folder to another folder.

Public function SearchMess(Criteria: string; const FoundMess: TStrings): Boolean;

Return message numbers from currently selected folder as result of searching. Search criteria is very complex language (see to IMAP specification) similar to SQL (but not same syntax!).

Public function SetFlagsMess(MessID: integer; Flags: string): Boolean;

Sets flags of message from current selected folder.

Public function GetFlagsMess(MessID: integer; var Flags: string): Boolean;

Gets flags of message from current selected folder.

Public function AddFlagsMess(MessID: integer; Flags: string): Boolean;

Add flags to message's flags.

Public function DelFlagsMess(MessID: integer; Flags: string): Boolean;

Remove flags from message's flags.

Public function StartTLS: Boolean;

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

Public function GetUID(MessID: integer; var UID : Integer): Boolean;

return UID of requested message ID.

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

Try to find given capabily in capabilty string returned from IMAP server.

Properties

Published property ResultString: string read FResultString;

Status line with result of last operation.

Published property FullResult: TStringList read FFullResult;

Full result of last IMAP operation.

Published property IMAPcap: TStringList read FIMAPcap;

List of server capabilites.

Published property AuthDone: Boolean read FAuthDone;

Authorization is successful done.

Published property UID: Boolean read FUID Write FUID;

Turn on or off usage of UID (unicate identificator) of messages instead only sequence numbers.

Published property SelectedFolder: string read FSelectedFolder;

Name of currently selected folder.

Published property SelectedCount: integer read FSelectedCount;

Count of messages in currently selected folder.

Published property SelectedRecent: integer read FSelectedRecent;

Count of not-visited messages in currently selected folder.

Published property SelectedUIDvalidity: integer read FSelectedUIDvalidity;

This number with name of folder is unique indentificator of folder. (If someone delete folder and next create new folder with exactly same name of folder, this number is must be different!)

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