72 if (is_array($params)) {
73 $this->_params = join(
' ', $params);
75 $this->_params = $params;
82 if (defined(
'PHP_EOL')) {
85 $this->sep = (strpos(PHP_OS,
'WIN') ===
false) ?
"\n" :
"\r\n";
115 function send($recipients, $headers, $body)
117 if (!is_array($headers)) {
122 if (is_a(
$result,
'PEAR_Error')) {
127 if (is_array($recipients)) {
128 $recipients = implode(
', ', $recipients);
134 if (isset($headers[
'Subject'])) {
135 $subject = $headers[
'Subject'];
136 unset($headers[
'Subject']);
141 unset($headers[
'To']);
145 if (is_a($headerElements,
'PEAR_Error')) {
146 return $headerElements;
148 list(, $text_headers) = $headerElements;
152 if (empty($this->_params) || ini_get(
'safe_mode')) {
153 $result = mail($recipients, $subject, $body, $text_headers);
155 $result = mail($recipients, $subject, $body, $text_headers,