mail_fetchPOP3 client class
POP connection is opened when class is constructed. All command_* methods execute specific POP commands on server. Most of other methods should be used only internally. Only login() method is public. If command returns mixed content and you expect message text, ids or something else, make sure that it is not boolean false.
Basic use:
Located in /plugins/mail_fetch/class.mail_fetch.php (line 50)
integer
$auth
= 1 (line 85)
Authentication type
Bitwise variable. If variable covers more than one authentication method, login() tries to use all of them until first successful auth.
array
$capabilities
= array() (line 115)
Capabilities (POP3EXT capa)
stream
$conn
= false (line 97)
Connection resource
string
$error
= '' (line 121)
Error message buffer
string
$greeting
= '' (line 103)
Server greeting
string
$host
= '' (line 55)
Server name
integer
$port
= 0 (line 62)
POP connection port.
Defaults to 110 on plain text connections and to 995 on TLS
string
$response
= '' (line 131)
Response buffer
Variable is used to store last positive POP server response checked in check_response() method. Used internally to handle mixed single and multiline command responses.
integer
$timeout
= 60 (line 91)
Connection timeout
string
$timestamp
= '' (line 109)
Timestamp (with <> or empty string)
integer
$tls
= 0 (line 72)
Connection type
Constructor mail_fetch (line 145)
Constructor function
parameter array keys 'host' - required string, address of server. ip or fqn 'port' - optional integer, port of server. 'tls' - optional integer, connection type 'timeout' - optional integer, connection timeout 'auth' - optional integer, used authentication mechanism. See description of class properties
check_php_version (line 262)
Standard SquirrelMail function copied to class in order to make class independent from SquirrelMail.
check_response (line 245)
Reads first response line and checks it for errors
command_apop (line 539)
APOP authentication
Command is optional and not required by rfc1939. APOP support requires plain text passwords stored on server and some servers don't support it. Standard qmail pop3d declares apop support without checking if checkpassword supports it.
command_auth_plain (line 618)
SASL PLAIN authentication
Current implementation does not support alternative SASL authentication identities.
command_capa (line 557)
Checks pop server capabilities
RFC2449. Fills capabilities array.
command_dele (line 408)
command_list (line 346)
List mailbox messages
command_noop (line 417)
POP noop command
command_pass (line 523)
USER authentication (password command)
Command is optional and not required by rfc1939. Requires successful user command.
command_quit (line 434)
Closes POP connection
command_retr (line 378)
Gets message text
command_rset (line 426)
Resets message state
command_stat (line 330)
Gets mailbox status
array with 'count' and 'size' keys
command_stls (line 583)
RFC 2595 POP STARTTLS support
command_top (line 450)
Gets message headers and $n of body lines.
Command is optional and not required by rfc1939
command_uidl (line 475)
Gets unique message ids
Command is optional and not required by rfc1939
command_user (line 510)
USER authentication (username command)
Command is optional and not required by rfc1939. If command is successful, pass command must be executed after it.
login (line 275)
Generic login wrapper
Connection is not closed on login error (unless POP server drops connection)
open (line 192)
Opens pop connection
Command handles TLS and STLS connection differences and fills capabilities array with RFC2449 CAPA data.
set_error (line 315)
Sets error in error buffer and returns boolean false
Documentation generated on Sun, 22 Nov 2009 17:36:18 +0200 by phpDocumentor 1.4.3