POP3 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 43)
Authentication type
Bitwise variable. If variable covers more than one authentication method, login() tries to use all of them until first successful auth.
Capabilities (POP3EXT capa)
Connection resource
Error message buffer
Server greeting
Server name
POP connection port.
Defaults to 110 on plain text connections and to 995 on TLS
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.
Connection timeout
Timestamp (with <> or empty string)
Connection type
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
Standard SquirrelMail function copied to class in order to make class independent from SquirrelMail.
Reads first response line and checks it for errors
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.
Checks pop server capabilities
RFC2449. Fills capabilities array.
USER authentication (password command)
Command is optional and not required by rfc1939. Requires successful user command.
Gets message text
Gets mailbox status
array with 'count' and 'size' keys
Gets message headers and $n of body lines.
Command is optional and not required by rfc1939
Gets unique message ids
Command is optional and not required by rfc1939
USER authentication (username command)
Command is optional and not required by rfc1939. If command is successful, pass command must be executed after it.
Generic login wrapper
Connection is not closed on login error (unless POP server drops connection)
Opens pop connection
Command handles TLS and STLS connection differences and fills capabilities array with RFC2449 CAPA data.
Sets error in error buffer and returns boolean false
Documentation generated on Mon, 13 Jan 2020 04:22:03 +0100 by phpDocumentor 1.4.3