Send mail using SMTP protocol
SmtpTransport $_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' SocketExceptionconfig( 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.
http://api.cakephp.org/2.8/class-SmtpTransport.html