__construct()
__destruct()
connect()
getLog()
getMaximumLog()
getRequest()
getResponse()
resetLog()
setMaximumLog()
_addLog()
_connect()
_disconnect()
_expect()
_receive()
_send()
$host
$maximumLog
$port
$request
$response
$socket
$validHost
$log
EOL
TIMEOUT_CONNECTION
Provides low-level methods for concrete adapters to communicate with a remote mail server and track requests and responses.
todo | Implement proxy settings |
---|
__construct(string $host, int $port)
string
OPTIONAL Hostname of remote connection (default: 127.0.0.1)
int
OPTIONAL Port number (default: null)
\Zend\Mail\Protocol\Exception\RuntimeException |
---|
__destruct()
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() : int
int
the maximum log sizegetRequest() : string
string
getResponse() : array
array
resetLog()
setMaximumLog(int $maximumLog)
int
Maximum log size
_addLog(string $value)
string
new transaction
_connect(string $remote) : bool
An example $remote string may be 'tcp://mail.example.com:25' or 'ssh://hostname.com:2222'
string
Remote
\Zend\Mail\Protocol\Exception\RuntimeException |
---|
bool
_disconnect()
_expect(string | array $code, int $timeout) : string
Read the response from the stream and check for expected return code. Throws a Zend\Mail\Protocol\Exception\ExceptionInterface if an unexpected code is returned.
stringarray
One or more codes that indicate a successful response
int
Per-request timeout value if applicable
\Zend\Mail\Protocol\Exception\RuntimeException |
---|
string
Last line of response string_receive(int $timeout) : string
int
Per-request timeout value if applicable
\Zend\Mail\Protocol\Exception\RuntimeException |
---|
string
_send(string $request) : int | bool
string
\Zend\Mail\Protocol\Exception\RuntimeException |
---|
int
bool
Number of bytes written to remote host$host : string
$maximumLog : int
$port : int
$request : string
$response : array
$socket : resource
$validHost : \Zend\Validator\ValidatorChain
$log : array
EOL
TIMEOUT_CONNECTION