Class SmtpTransport
Send mail using SMTP protocol
- AbstractTransport
- 
			 SmtpTransport SmtpTransport
		
		
		
		Package: Cake\Network\Email
Copyright: Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
License: MIT License
Location: Cake/Network/Email/SmtpTransport.php
	
	Copyright: Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
License: MIT License
Location: Cake/Network/Email/SmtpTransport.php
Properties summary
- 
			$_contentprotectedstringContent of email to return
- 
			$_lastResponseprotectedarrayThe response of the last sent SMTP command.
- 
			$_socketprotectedSocket to SMTP server
Inherited Properties
Method Summary
- 
			_auth() protectedSend authentication
- 
			_bufferResponseLines() protectedParses and stores the reponse lines in'code' => 'message'format.
- 
			_connect() protectedConnect to SMTP Server
- 
			_disconnect() protectedDisconnect
- 
			_generateSocket() protectedHelper method to generate socket
- 
			_prepareFromAddress() protectedPrepares thefromemail address.
- 
			_prepareFromCmd() protectedPrepares theMAIL FROMSMTP command.
- 
			_prepareMessage() protectedPrepares the message body.
- 
			_prepareMessageHeaders() protectedPrepares the message headers.
- 
			_prepareRcptCmd() protectedPrepares theRCPT TOSMTP command.
- 
			_prepareRecipientAddresses() protectedPrepares the recipient email addresses.
- 
			_sendData() protectedSend Data
- 
			_sendRcpt() protectedSend emails
- 
			_smtpSend() protectedProtected method for sending data to SMTP connection
- 
			config() publicSet the configuration
- 
			getLastResponse() publicReturns the response of the last sent SMTP command.
- 
			send() publicSend mail
Method Detail
_bufferResponseLines() protected ¶
_bufferResponseLines( array $responseLines )
Parses and stores the reponse lines in 'code' => 'message' format.
Parameters
- array $responseLines
- Response lines to parse.
_prepareFromCmd() protected ¶
_prepareFromCmd( string $email )
Prepares the MAIL FROM SMTP command.
Parameters
- string $email
- The email address to send with the command.
Returns
					string
				
		_prepareRcptCmd() protected ¶
_prepareRcptCmd( string $email )
Prepares the RCPT TO SMTP command.
Parameters
- string $email
- The email address to send with the command.
Returns
					string
				
		_smtpSend() protected ¶
_smtpSend( string|null $data , string|boolean $checkCode = '250' )
Protected method for sending data to SMTP connection
Parameters
- string|null $data
- Data to be sent to SMTP server
- string|boolean $checkCode optional '250'
- Code to check for in server response, false to skip
Returns
					string|null
The matched code, or null if nothing matched
				
				The matched code, or null if nothing matched
Throws
config() public ¶
config( array $config = null )
Set the configuration
Parameters
- array $config optional null
- Configuration options.
Returns
					array
Returns configs
				
				Returns configs
Overrides
getLastResponse() public ¶
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... )
Returns
					array
				
		Methods inherited from AbstractTransport
_headersToString() protected ¶
_headersToString( array $headers , string $eol = "\r\n" )
Help to convert headers in string
Parameters
- array $headers
- Headers in format key => value
- string $eol optional "\r\n"
- End of line string.
Returns
					string
				
		