equal
deleted
inserted
replaced
13 * to license@zend.com so we can send you a copy immediately. |
13 * to license@zend.com so we can send you a copy immediately. |
14 * |
14 * |
15 * @category Zend |
15 * @category Zend |
16 * @package Zend_Mail |
16 * @package Zend_Mail |
17 * @subpackage Transport |
17 * @subpackage Transport |
18 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) |
18 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) |
19 * @license http://framework.zend.com/license/new-bsd New BSD License |
19 * @license http://framework.zend.com/license/new-bsd New BSD License |
20 * @version $Id: Sendmail.php 21603 2010-03-22 12:47:11Z yoshida@zend.co.jp $ |
20 * @version $Id: Sendmail.php 24593 2012-01-05 20:35:02Z matthew $ |
21 */ |
21 */ |
22 |
22 |
23 |
23 |
24 /** |
24 /** |
25 * @see Zend_Mail_Transport_Abstract |
25 * @see Zend_Mail_Transport_Abstract |
31 * Class for sending eMails via the PHP internal mail() function |
31 * Class for sending eMails via the PHP internal mail() function |
32 * |
32 * |
33 * @category Zend |
33 * @category Zend |
34 * @package Zend_Mail |
34 * @package Zend_Mail |
35 * @subpackage Transport |
35 * @subpackage Transport |
36 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) |
36 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) |
37 * @license http://framework.zend.com/license/new-bsd New BSD License |
37 * @license http://framework.zend.com/license/new-bsd New BSD License |
38 */ |
38 */ |
39 class Zend_Mail_Transport_Sendmail extends Zend_Mail_Transport_Abstract |
39 class Zend_Mail_Transport_Sendmail extends Zend_Mail_Transport_Abstract |
40 { |
40 { |
41 /** |
41 /** |
72 * @param string|array|Zend_Config $parameters OPTIONAL (Default: null) |
72 * @param string|array|Zend_Config $parameters OPTIONAL (Default: null) |
73 * @return void |
73 * @return void |
74 */ |
74 */ |
75 public function __construct($parameters = null) |
75 public function __construct($parameters = null) |
76 { |
76 { |
77 if ($parameters instanceof Zend_Config) { |
77 if ($parameters instanceof Zend_Config) { |
78 $parameters = $parameters->toArray(); |
78 $parameters = $parameters->toArray(); |
79 } |
79 } |
80 |
80 |
81 if (is_array($parameters)) { |
81 if (is_array($parameters)) { |
82 $parameters = implode(' ', $parameters); |
82 $parameters = implode(' ', $parameters); |
83 } |
83 } |
84 |
84 |
85 $this->parameters = $parameters; |
85 $this->parameters = $parameters; |
86 } |
86 } |
87 |
87 |
88 |
88 |
89 /** |
89 /** |
107 restore_error_handler(); |
107 restore_error_handler(); |
108 } else { |
108 } else { |
109 if(!is_string($this->parameters)) { |
109 if(!is_string($this->parameters)) { |
110 /** |
110 /** |
111 * @see Zend_Mail_Transport_Exception |
111 * @see Zend_Mail_Transport_Exception |
112 * |
112 * |
113 * Exception is thrown here because |
113 * Exception is thrown here because |
114 * $parameters is a public property |
114 * $parameters is a public property |
115 */ |
115 */ |
116 require_once 'Zend/Mail/Transport/Exception.php'; |
116 require_once 'Zend/Mail/Transport/Exception.php'; |
117 throw new Zend_Mail_Transport_Exception( |
117 throw new Zend_Mail_Transport_Exception( |