TSyncPop3Cli Last Updated: 09/29/2001 |
TPopSync3Cli class adds synchronous functions to the TPop3Cli class, which implements the POP3 protocol (RFC-1225, RFC-1939) used to retrieve mail form a mail server.
Here are the sections available for the TSyncPop3Cli:
- [ Properties ]
- [ Events ]
- [ Methods ]
- [ Notes ]
Below is the full description for all the sections in the TSyncPop3Cli:
Below is a list of all Properties for use as a quick reference:
Below is a list of all Properties with their complete descriptions:
Connected: | property Connected: Boolean; Specifies if there is currently an active connection to the POP3 server. |
[Return to Top] | |
ErrorMessage: | property ErrorMessage: String; Contains the string of the last error that occurred. |
[Return to Top] | |
Host: | property Host: String; The POP3 Server to which you want to connect. |
[Return to Top] | |
LastResponse: | property LastResponse: String; The server response from the most recent command request. |
[Return to Top] | |
LocalAddr: | property LocalAddr: String; Can be a dotted IP address, or a hostname. Preferable is a dotted IP address. For a client it is the machine to connect to, and for a server it is the interface to listen on if it is a multihomed computer. Default value for a server is '0.0.0.0'. |
[Return to Top] | |
MsgCount: | property MsgCount: Integer; Updated by the StatSync() method with the number of messages in the maildrop. |
[Return to Top] | |
MsgLines: | property MsgLines: Integer; This is the number of lines to display when the TopSync() method is issued. Set to zero to display only the message headers. The line can be read from the LastResponse property. |
[Return to Top] | |
MsgNum: | property MsgNum: Integer; This is the number of the message on which you will operate. It is also updated by the LastSync() method. |
[Return to Top] | |
MsgSize: | property MsgSize: Integer; Updated by the StatSync() and LastSync() methods with the total size of the messages in the maildrop. It is also updated with the size in bytes of a singe message by certain methods. |
[Return to Top] | |
MsgUidl: | property MsgUidl: String; Contains the Unique Identifier Listing (UIDL) number for the current message. It is updated by the UidlSync() method. |
[Return to Top] | |
MultiThreaded: | property MultiThreaded: Boolean; Set this to true if you use TSyncPop3Cli in a thread. Note it has nothing to do with multiple sockets. |
[Return to Top] | |
PassWord: | property PassWord: String; The password used to authenticate with the POP3 server. |
[Return to Top] | |
Port: | property Port: String; The tcp port of the POP3 server to which you want to connect. |
[Return to Top] | |
ProtocolState: | property ProtocolState: TPop3ProtocolState; The current state of the POP3 transaction. It can be any of the following: pop3Disconnected, pop3WaitingUser, pop3WaitingPass, pop3Transaction |
[Return to Top] | |
State: | property State: TPop3State; The current state of the component. It can be any of the following: pop3Ready, pop3DnsLookup, pop3Connecting, pop3Connected, pop3InternalReady, pop3WaitingBanner, pop3WaitingResponse, pop3Abort. |
[Return to Top] | |
Timeout: | property Timeout: Integer; This is the amount of time in seconds the component will wait for a response from the server before the request fails. The default is 15 seconds. Set this to 0 for no timeout. |
[Return to Top] | |
UserName: | property UserName: String; The username used to authenticate with the POP3 server. |
[Return to Top] | |
Below is a list of all Events for use as a quick reference:
Below is a list of all Events with their complete descriptions:
OnDisplay: | property OnDisplay: TPop3Display; This event is fired whenever a command is sent or a response is received. This is mainly used to trace or log the POP3 transaction with the server while debugging. |
[Return to Top] | |
OnListBegin: | property OnListBegin: TNotifyEvent; When the ListSync() method is called with MsgNum zero, this event is fired to mark the beginning of the list processing. |
[Return to Top] | |
OnListEnd: | property OnListEnd: TNotifyEvent; When the ListSync() method is called with MsgNum zero, this event is fired when the list has been processed completely. |
[Return to Top] | |
OnListLine: | property OnListLine: TNotifyEvent; When the ListSync() method is called with MsgNum zero, this event is fired for each line retrieved from the list. The line can be read from the LastResponse property. |
[Return to Top] | |
OnMessageBegin: | property OnMessageBegin: TNotifyEvent; This event is fired when a message is about to be retrieved after a RetrSync() or TopSync() method has been called. |
[Return to Top] | |
OnMessageEnd: | property OnMessageEnd: TNotifyEvent; This event is fired when a message has been retrieved completely after a RetrSync() or TopSync() method call. In the case of the TopSync() method, OnMessageEnd is fired after the lines specified in the MsgLines property have been retrieved. |
[Return to Top] | |
OnMessageLine: | property OnMessageLine: TNotifyEvent; This event is fired for each line retrieved after a RetrSync() or TopSync() method call. The line can be read from the LastResponse property. |
[Return to Top] | |
OnRequestDone: | property OnRequestDone: TPop3RequestDone; This event is fired after a request to the POP3 server has finished and a response has been received, even if the request failed. |
[Return to Top] | |
OnResponse: | property OnResponse: TPop3Display; This event is fired every time a response is received from the POP3 server as a consequence to a POP3 command. |
[Return to Top] | |
OnSessionClosed: | property OnSessionClosed: TSessionClosed; This event is fired when the POP3 session is closed and the connection to the server is dropped due to a QuitSync() or AbortSync() method call. |
[Return to Top] | |
OnSessionConnected: | property OnSessionConnected: TSessionConnected; This event is fired when a connection to the POP3 server is established and the POP3 session starts after a ConnectSync() or OpenSync() method call (when the welcome banner is received). In the case of the OpenSync() method, OnSessionConnected is fired after the connection is established but before the USER and PASS commands are sent. |
[Return to Top] | |
OnStateChange: | property OnStateChange: TNotifyEvent; This event is fired whenever the state of the POP3 session is changed. |
[Return to Top] | |
OnUidlBegin: | property OnUidlBegin: TNotifyEvent; When the UidlSync() method is called with MsgNum zero, this event is fired to mark the beginning of the list processing. |
[Return to Top] | |
OnUidlEnd: | property OnUidlEnd: TNotifyEvent; When the UidlSync() method is called with MsgNum zero, this event is fired when the list has been processed completely. |
[Return to Top] | |
OnUidlLine: | property OnUidlLine: TNotifyEvent; When the UidlSync() method is called with MsgNum zero, this event is fired for each line retrieved from the list. The line can be read from the LastResponse property. |
[Return to Top] | |
Below is a list of all Methods for use as a quick reference:
Below is a list of all Methods with their complete descriptions:
AbortSync: | function AbortSync: Boolean; Aborts the current operation and closes the connection. This is a quick and dirty way of closing a POP3 session. |
[Return to Top] | |
APopSync: | function APopSync: Boolean; Attempts server authentication using encrypted password. If the POP3 server supports this method, it is more secure to use it than the UserSync() PassSync() methods that send the password in plaintext. |
[Return to Top] | |
ClearErrorMessage: | function ClearErrorMessageSync: Boolean; Clears the ErrorMessage property. |
[Return to Top] | |
ConnectSync: | function ConnectSync: Boolean; Connects to the POP3 server and starts the POP3 session. |
[Return to Top] | |
DeleSync: | function DeleSync: Boolean; Marks a message for deletion. The message to be deleted is read from the MsgNum property. Note: Messages marked for deletion are not deleted right away. They are deleted when the QuitSync() method is issued and the session is closed. This allows messages to be undeleted using the RSetSync() method. |
[Return to Top] | |
LastSync: | function LastSync: Boolean; Updates the MsgNum and MsgSize properties with the number and size of the last message retrieved, respectively. |
[Return to Top] | |
ListSync: | function ListSync: Boolean; Retrieves a list with message information from the server. If the MsgNum property is zero, all messages are listed and the MsgNum and MsgSize properties are updated for every message read. The OnListLine event is fired after each message is read. If the MsgNum property is greater than zero, then the MsgSize property is updated with the size of that message in bytes. |
[Return to Top] | |
NoopSync: | function NoopSync: Boolean; The 'No Operation' command. This command is used to avoid disconnection due to an idle timeout. Most servers ignore this command so it is pretty much useless. |
[Return to Top] | |
OpenSync: | function OpenSync: Boolean; The combination of the ConnectSync(), UserSync(), and PassSync() methods sent asynchronously in sequence. |
[Return to Top] | |
PassSync: | function PassSync: Boolean; Sends the Password (in plaintext) for authentication. |
[Return to Top] | |
QuitSync: | function QuitSync: Boolean; Closes the POP3 session and disconnects from the server. At this point, the server removes any messages marked for deletion by the DeleSync() method. |
[Return to Top] | |
RetrSync: | function RetrSync: Boolean; Retrieves a message from the server. The message to be retrieved is read from the MsgNum property. |
[Return to Top] | |
RPopSync: | function RPopSync: Boolean; The RPopSync() method does the same as the PassSync() method to authenticate access to the maildrop except that the POP3 server considers if the remote user specified by the RPopSync() method is allowed to access the maildrop for the user specified by the UserSync() method. |
[Return to Top] | |
RSetSync: | function RSetSync: Boolean; Resets the POP3 session and clears all messages marked for deletion. |
[Return to Top] | |
StatSync: | function StatSync: Boolean; Updates the MsgCount and MsgSize properties with the total number of messages and the total byte size of the maildrop, respectively. |
[Return to Top] | |
TopSync: | function TopSync: Boolean; Retrieves only part of a message. The message to be retrieved is taken from the MsgNum property and the amount of lines is taken from the MsgLines properties. The lines are counted from the top of the message, after the headers, and the headers are always included. If MsgLines is zero, then only the headers of the message are retrieved. The OnMessageLine event is fired after each line that is retrieved. |
[Return to Top] | |
UidlSync: | function UidlSync: Boolean; Retrieves a list of UIDLs from the server. If the MsgNum property is zero, all messages are listed and the MsgNum and MsgUidl properties are updated for every message read. The OnUidlLine event is fired after each message is read. If the MsgNum property is greater than zero, then the MsgUidl property is updated with the Unique ID Listing of that message. |
[Return to Top] | |
UserSync: | function UserSync: Boolean; Sends the Username for authentication. |
[Return to Top] | |
Below is a list of all Notes for use as a quick reference:
Below is a list of all Notes with their complete descriptions:
Synchronous: | TSyncPop3Cli is derived from the TPop3Cli class and adds synchronous functions. You should avoid using this component because synchronous functions, despite being easy to implement, result in lower performance. |
[Return to Top] | |