@@ -45,7 +45,6 @@ class Zend_Mail_Transport_Sendmail extends Zend_Mail_Transport_Abstract
45
45
*/
46
46
public $ subject = null ;
47
47
48
-
49
48
/**
50
49
* Config options for sendmail parameters
51
50
*
@@ -85,7 +84,6 @@ public function __construct($parameters = null)
85
84
$ this ->parameters = $ parameters ;
86
85
}
87
86
88
-
89
87
/**
90
88
* Send mail using PHP native mail()
91
89
*
@@ -97,37 +95,13 @@ public function __construct($parameters = null)
97
95
*/
98
96
public function _sendMail ()
99
97
{
100
- if ($ this ->parameters === null ) {
101
- set_error_handler (array ($ this , '_handleMailErrors ' ));
102
- $ result = mail (
103
- $ this ->recipients ,
104
- $ this ->_mail ->getSubject (),
105
- $ this ->body ,
106
- $ this ->header );
107
- restore_error_handler ();
108
- } else {
109
- if (!is_string ($ this ->parameters )) {
110
- /**
111
- * @see Zend_Mail_Transport_Exception
112
- *
113
- * Exception is thrown here because
114
- * $parameters is a public property
115
- */
116
- #require_once 'Zend/Mail/Transport/Exception.php';
117
- throw new Zend_Mail_Transport_Exception (
118
- 'Parameters were set but are not a string '
119
- );
120
- }
121
-
122
- set_error_handler (array ($ this , '_handleMailErrors ' ));
123
- $ result = mail (
124
- $ this ->recipients ,
125
- $ this ->_mail ->getSubject (),
126
- $ this ->body ,
127
- $ this ->header ,
128
- $ this ->parameters );
129
- restore_error_handler ();
130
- }
98
+ set_error_handler (array ($ this , '_handleMailErrors ' ));
99
+ $ result = mail (
100
+ $ this ->recipients ,
101
+ $ this ->_mail ->getSubject (),
102
+ $ this ->body ,
103
+ $ this ->header );
104
+ restore_error_handler ();
131
105
132
106
if ($ this ->_errstr !== null || !$ result ) {
133
107
/**
@@ -138,7 +112,6 @@ public function _sendMail()
138
112
}
139
113
}
140
114
141
-
142
115
/**
143
116
* Format and fix headers
144
117
*
@@ -196,7 +169,7 @@ protected function _prepareHeaders($headers)
196
169
197
170
// Sanitize the From header
198
171
if (isset ($ headers ['From ' ])) {
199
- $ addressList = array_filter ($ headers ['From ' ], function ($ key ) {
172
+ $ addressList = array_filter ($ headers ['From ' ], function ($ key ) {
200
173
return $ key !== 'append ' ;
201
174
}, ARRAY_FILTER_USE_KEY );
202
175
foreach ($ addressList as $ address ) {
0 commit comments