Send mail using SMTP protocol
$_content
protected string
$_lastResponse
protected array
$_socket
protected 'code' => 'message'
format. from
email address. MAIL FROM
SMTP command. RCPT TO
SMTP command. _bufferResponseLines( array $responseLines )
Parses and stores the reponse lines in 'code' => 'message'
format.
$responseLines
_generateSocket( )
Helper method to generate socket
SocketException
_prepareFromAddress( CakeEmail $email )
Prepares the from
email address.
CakeEmail
$email
_prepareFromCmd( string $email )
Prepares the MAIL FROM
SMTP command.
$email
_prepareMessage( CakeEmail $email )
Prepares the message body.
CakeEmail
$email
_prepareMessageHeaders( CakeEmail $email )
Prepares the message headers.
CakeEmail
$email
_prepareRcptCmd( string $email )
Prepares the RCPT TO
SMTP command.
$email
_prepareRecipientAddresses( CakeEmail $email )
Prepares the recipient email addresses.
CakeEmail
$email
_sendData( CakeEmail $email )
Send Data
CakeEmail
$email
SocketException
_sendRcpt( CakeEmail $email )
Send emails
CakeEmail
$email
SocketException
_smtpSend( string|null $data , string|boolean $checkCode '250' )
Protected method for sending data to SMTP connection
$data
$checkCode
optional '250' SocketException
config( array $config null )
Set the configuration
$config
optional null AbstractTransport::config()
getLastResponse( )
Returns the response of the last sent SMTP command.
A response consists of one or more lines containing a response code and an optional response message text:
array( array( 'code' => '250', 'message' => 'mail.example.com' ), array( 'code' => '250', 'message' => 'PIPELINING' ), array( 'code' => '250', 'message' => '8BITMIME' ), // etc... )
send( CakeEmail $email )
Send mail
CakeEmail
$email
SocketException
_headersToString( array $headers , string $eol "\r\n" )
Help to convert headers in string
$headers
$eol
optional "\r\n"
© 2005–2016 The Cake Software Foundation, Inc.
Licensed under the MIT License.
CakePHP is a registered trademark of Cake Software Foundation, Inc.
We are not endorsed by or affiliated with CakePHP.
https://api.cakephp.org/2.9/class-SmtpTransport.html