Performs CRAM-MD5 authentication
Minimum implementation according to RFC2821: EHLO, MAIL FROM, RCPT TO, DATA, RSET, NOOP, QUIT
package | Default |
---|---|
inherited_from | \Zend\Mail\Protocol\Smtp |
__construct(string|array $host= '127.0.0.1'
, null|integer $port= null
, null|array $config= null
)
All parameters may be passed as an array to the first argument of the constructor. If so,
inherited_from | \Zend\Mail\Protocol\Smtp::__construct() |
---|
string
array
(Default: 127.0.0.1)
null
integer
(Default: null)
null
array
Auth-specific parameters
__construct(string $host= '127.0.0.1'
, integer $port= null
)
string
OPTIONAL Hostname of remote connection (default: 127.0.0.1)
integer
OPTIONAL Port number (default: null)
\Zend\Mail\Protocol\Exception\RuntimeException |
---|
__destruct()
auth()
This default method is implemented by AUTH adapters to properly authenticate to a remote host.
inherited_from | \Zend\Mail\Protocol\Smtp::auth() |
---|
auth()
This default method is implemented by AUTH adapters to properly authenticate to a remote host.
\Zend\Mail\Protocol\Exception\RuntimeException |
---|
connect()
Concrete adapters for this class will implement their own unique connect scripts, using the _connect() method to create the socket resource.
data(string $data)
string
\Zend\Mail\Protocol\Exception\RuntimeException |
---|
disconnect()
getLog() : string
string
getMaximumLog() : integer
integer
the maximum log sizegetPassword() : string
string
getRequest() : string
string
getResponse() : array
array
getUsername() : string
string
hasSession() : boolean
boolean
helo(string $host = '127.0.0.1'
)
string
The client hostname or IP address (default: 127.0.0.1)
\Zend\Mail\Protocol\Exception\RuntimeException |
---|
mail(string $from)
string
Sender mailbox
\Zend\Mail\Protocol\Exception\RuntimeException |
---|
noop()
Not used by Zend\Mail, could be used to keep a connection alive or check if it is still open.
quit()
rcpt(string $to)
string
Receiver(s) mailbox
\Zend\Mail\Protocol\Exception\RuntimeException |
---|
resetLog()
rset()
Can be used to restore a clean smtp communication state when a transaction has been cancelled or commencing a new transaction.
setMaximumLog(integer $maximumLog)
integer
Maximum log size
setPassword(string $password) : \Zend\Mail\Protocol\Smtp\Auth\Crammd5
string
\Zend\Mail\Protocol\Smtp\Auth\Crammd5
setUsername(string $username) : \Zend\Mail\Protocol\Smtp\Auth\Crammd5
string
\Zend\Mail\Protocol\Smtp\Auth\Crammd5
vrfy(string $user)
Not used by Zend\Mail.
string
User Name or eMail to verify
_addLog(string $value)
string
new transaction
_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\RuntimeException |
---|
boolean
_disconnect()
_ehlo(string $host)
string
The client hostname or IP address (default: 127.0.0.1)
\Exception \Zend\Mail\Protocol\Exception\ExceptionInterface
|
---|
_expect(string|array $code, integer $timeout = null
) : 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.
string
array
One or more codes that indicate a successful response
integer
Per-request timeout value if applicable
\Zend\Mail\Protocol\Exception\RuntimeException |
---|
string
Last line of response string_hmacMd5(string $key, string $data, integer $block = 64
) : string
string
Challenge key (usually password)
string
Challenge data
integer
Length of blocks (deprecated; unused)
string
_receive(integer $timeout = null
) : string
integer
Per-request timeout value if applicable
\Zend\Mail\Protocol\Exception\RuntimeException |
---|
string
_send(string $request) : integer | boolean
string
\Zend\Mail\Protocol\Exception\RuntimeException |
---|
integer
boolean
Number of bytes written to remote host_startSession()
_stopSession()
$auth : boolean
false
$data : boolean
null
$host : string
$mail : boolean
false
$maximumLog : integer
64
$password : string
$port : integer
$rcpt : boolean
false
$request : string
$response : array
$secure : string
$sess : boolean
false
$socket : resource
$transport : string
'tcp'
$username : string
$validHost : \Zend\Validator\ValidatorChain
$log : array
array()
EOL = "\r\n"
TIMEOUT_CONNECTION = 30