On this page
Class MailTransport
Send mail using mail() function
- AbstractTransport
- MailTransport 
Package: Cake\Network\Email
Copyright: Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
License: MIT License
Location: Cake/Network/Email/MailTransport.php
  
  Copyright: Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
License: MIT License
Location: Cake/Network/Email/MailTransport.php
Inherited Properties
Method Summary
- 
    _mail() protectedWraps internal function mail() and throws exception instead of errors if anything goes wrong
- 
    send() publicSend mail
Method Detail
_mail()source protected
_mail( string $to , string $subject , string $message , string $headers , string $params null )Wraps internal function mail() and throws exception instead of errors if anything goes wrong
Parameters
- 
     string $to
- email's recipient
- 
     string $subject
- email's subject
- 
     string $message
- email's body
- 
     string $headers
- email's custom headers
- 
     string $paramsoptional null
- additional params for sending email, will be ignored when in safe_mode
Throws
SocketExceptionif mail could not be sent
send()source public
send( CakeEmail $email )Send mail
Parameters
- CakeEmail- $email
- CakeEmail
Returns
arrayThrows
SocketExceptionWhen mail cannot be sent.
Methods inherited from AbstractTransport
_headersToString()source protected
_headersToString( array $headers , string $eol "\r\n" )Help to convert headers in string
Parameters
- 
     array $headers
- Headers in format key => value
- 
     string $eoloptional "\r\n"
- End of line string.
Returns
stringconfig()source public
config( array $config null )Set the config
Parameters
- 
     array $configoptional null
- Configuration options.
Returns
arrayReturns configs
© 2005–2017 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.10/class-MailTransport.html