Public Member Functions | |
__construct ($host= '127.0.0.1', $port=null) | |
__destruct () | |
connect () | |
getRequest () | |
getResponse () | |
getLog () | |
resetLog () | |
Data Fields | |
const | EOL = "\r\n" |
const | TIMEOUT_CONNECTION = 30 |
Protected Member Functions | |
_connect ($remote) | |
_disconnect () | |
_send ($request) | |
_receive ($timeout=null) | |
_expect ($code, $timeout=null) | |
Protected Attributes | |
$_host | |
$_port | |
$_validHost | |
$_socket | |
$_request | |
$_response | |
$_template = '%d%s' |
Definition at line 50 of file Abstract.php.
__construct | ( | $ | host = '127.0.0.1' , |
$ | port = null |
||
) |
Constructor.
string | $host | OPTIONAL Hostname of remote connection (default: 127.0.0.1) |
integer | $port | OPTIONAL Port number (default: null) |
Zend_Mail_Protocol_Exception |
Definition at line 128 of file Abstract.php.
__destruct | ( | ) |
Class destructor to cleanup open resources
Definition at line 151 of file Abstract.php.
_connect | ( | $ | remote ) | [protected] |
Connect to the server using the supplied transport and target
An example $remote string may be 'tcp://mail.example.com:25' or 'ssh://hostname.com:2222'
string | $remote | Remote |
Zend_Mail_Protocol_Exception |
Definition at line 218 of file Abstract.php.
_disconnect | ( | ) | [protected] |
Disconnect from remote host and free resource
Definition at line 254 of file Abstract.php.
_expect | ( | $ | code, |
$ | timeout = null |
||
) | [protected] |
Parse server response for successful codes
Read the response from the stream and check for expected return code. Throws a Zend_Mail_Protocol_Exception if an unexpected code is returned.
string | array | $code | One or more codes that indicate a successful response |
Zend_Mail_Protocol_Exception |
Definition at line 359 of file Abstract.php.
_receive | ( | $ | timeout = null ) |
[protected] |
Definition at line 305 of file Abstract.php.
_send | ( | $ | request ) | [protected] |
Send the given request followed by a LINEEND to the server.
string | $request |
Zend_Mail_Protocol_Exception |
Definition at line 269 of file Abstract.php.
connect | ( | ) | [abstract] |
Create a connection to the remote host
Concrete adapters for this class will implement their own unique connect scripts, using the _connect() method to create the socket resource.
Reimplemented in Zend_Mail_Protocol_Smtp.
getLog | ( | ) |
getRequest | ( | ) |
getResponse | ( | ) |
resetLog | ( | ) |
const EOL = "\r\n" |
Mail default EOL string
Definition at line 55 of file Abstract.php.
const TIMEOUT_CONNECTION = 30 |
Default timeout in seconds for initiating session
Definition at line 61 of file Abstract.php.