CakePHP
  • Documentation
    • Book
    • API
    • Videos
    • Reporting Security Issues
    • Privacy Policy
    • Logos & Trademarks
  • Business Solutions
  • Swag
  • Road Trip
  • Team
  • Community
    • Community
    • Get Involved
    • Issues (GitHub)
    • Bakery
    • Featured Resources
    • Training
    • Meetups
    • My CakePHP
    • CakeFest
    • Newsletter
    • Linkedin
    • YouTube
    • Facebook
    • Twitter
    • Mastodon
    • Help & Support
    • Forum
    • Stack Overflow
    • Slack
    • Paid Support
CakePHP

C CakePHP 2.0 API

  • Overview
  • Tree
  • Deprecated
  • Version:
    • 2.0
      • 4.2
      • 4.1
      • 4.0
      • 3.9
      • 3.8
      • 3.7
      • 3.6
      • 3.5
      • 3.4
      • 3.3
      • 3.2
      • 3.1
      • 3.0
      • 2.10
      • 2.9
      • 2.8
      • 2.7
      • 2.6
      • 2.5
      • 2.4
      • 2.3
      • 2.2
      • 2.1
      • 2.0
      • 1.3
      • 1.2

Packages

  • Cake
    • Cache
      • Engine
    • Configure
    • Console
      • Command
        • Task
    • Controller
      • Component
        • Auth
    • Core
    • Error
    • I18n
    • Log
      • Engine
    • Model
      • Behavior
      • Datasource
        • Database
        • Session
    • Network
      • Email
      • Http
    • Routing
      • Route
    • TestSuite
      • Coverage
      • Fixture
      • Reporter
    • Utility
    • View
      • Helper

Classes

  • AbstractTransport
  • CakeEmail
  • DebugTransport
  • MailTransport
  • SmtpTransport
 1: <?php
 2: /**
 3:  * Abstract send email
 4:  *
 5:  * PHP 5
 6:  *
 7:  * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
 8:  * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
 9:  *
10:  * Licensed under The MIT License
11:  * Redistributions of files must retain the above copyright notice.
12:  *
13:  * @copyright     Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
14:  * @link          http://cakephp.org CakePHP(tm) Project
15:  * @package       Cake.Network.Email
16:  * @since         CakePHP(tm) v 2.0.0
17:  * @license       MIT License (http://www.opensource.org/licenses/mit-license.php)
18:  */
19: 
20: /**
21:  * Abstract transport for sending email
22:  *
23:  * @package       Cake.Network.Email
24:  */
25: abstract class AbstractTransport {
26: 
27: /**
28:  * Configurations
29:  *
30:  * @var array
31:  */
32:     protected $_config = array();
33: 
34: /**
35:  * Send mail
36:  *
37:  * @params CakeEmail $email
38:  * @return array
39:  */
40:     abstract public function send(CakeEmail $email);
41: 
42: /**
43:  * Set the config
44:  *
45:  * @param array $config
46:  * @return array Returns configs
47:  */
48:     public function config($config = null) {
49:         if (is_array($config)) {
50:             $this->_config = $config;
51:         }
52:         return $this->_config;
53:     }
54: 
55: /**
56:  * Help to convert headers in string
57:  *
58:  * @param array $headers Headers in format key => value
59:  * @param string $eol
60:  * @return string
61:  */
62:     protected function _headersToString($headers, $eol = "\r\n") {
63:         $out = '';
64:         foreach ($headers as $key => $value) {
65:             if ($value === false || $value === null || $value === '') {
66:                 continue;
67:             }
68:             $out .= $key . ': ' . $value . $eol;
69:         }
70:         if (!empty($out)) {
71:             $out = substr($out, 0, -1 * strlen($eol));
72:         }
73:         return $out;
74:     }
75: 
76: }
77: 
OpenHub
Rackspace
Rackspace
  • Business Solutions
  • Showcase
  • Documentation
  • Book
  • API
  • Videos
  • Reporting Security Issues
  • Privacy Policy
  • Logos & Trademarks
  • Community
  • Get Involved
  • Issues (GitHub)
  • Bakery
  • Featured Resources
  • Training
  • Meetups
  • My CakePHP
  • CakeFest
  • Newsletter
  • Linkedin
  • YouTube
  • Facebook
  • Twitter
  • Mastodon
  • Help & Support
  • Forum
  • Stack Overflow
  • Slack
  • Paid Support

Generated using CakePHP API Docs