Zend_Mail_Protocol_Abstract
Provides low-level methods for concrete adapters to communicate with a remote mail server and track requests and responses.
category | Zend |
---|---|
package | Zend_Mail |
subpackage | Protocol |
copyright | Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) |
license | New BSD License |
version | $Id$ |
todo | Implement proxy settings |
__construct(string $host= '127.0.0.1'
, integer $port= null
) : void
string
OPTIONAL Hostname of remote connection (default: 127.0.0.1)
integer
OPTIONAL Port number (default: null)
\Zend_Mail_Protocol_Exception |
---|
__destruct() : void
connect()
Concrete adapters for this class will implement their own unique connect scripts, using the _connect() method to create the socket resource.
getLog() : string
string
getMaximumLog() : integer
integer
the maximum log sizegetRequest() : string
string
getResponse() : array
array
resetLog() : void
setMaximumLog(integer $maximumLog) : void
integer
Maximum log size
_addLog($value) : void
_connect(string $remote) : boolean
An example $remote string may be 'tcp://mail.example.com:25' or 'ssh://hostname.com:2222'
string
Remote
\Zend_Mail_Protocol_Exception |
---|
boolean
_disconnect() : void
_expect(string|array $code, $timeout = null
) : string
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
One or more codes that indicate a successful response
\Zend_Mail_Protocol_Exception |
---|
string
Last line of response string_receive($timeout = null
) : string
var | Per-request timeout value if applicable |
---|
\Zend_Mail_Protocol_Exception |
---|
string
_send(string $request) : integer | boolean
string
\Zend_Mail_Protocol_Exception |
---|
integer
boolean
Number of bytes written to remote host_setStreamTimeout(integer $timeout) : boolean
integer
boolean
$_host : string
$_maximumLog : integer
64
$_port : integer
$_request : string
$_response : array
$_socket : resource
$_template : resource
'%d%s'
deprecated | Since 1.10.3 |
---|
$_validHost : \Zend_Validate
$_log : array
array()
EOL = "\r\n"
TIMEOUT_CONNECTION = 30