1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-12 08:04:02 +02:00
This commit is contained in:
Jiří Petřek
2012-05-07 18:20:39 +02:00
parent 50a48feba3
commit 93f814d721

View File

@@ -23,7 +23,7 @@ class NativeMailerHandler extends MailHandler
protected $to; protected $to;
protected $subject; protected $subject;
protected $headers = array( protected $headers = array(
'Content-type: text-plain; charset=utf-8' "Content-type: text-plain; charset=utf-8"
); );
/** /**
@@ -44,12 +44,12 @@ class NativeMailerHandler extends MailHandler
/** /**
* @param string|array $header * @param string|array $header
*/ */
public function addHeader($header) public function addHeader($headers)
{ {
if (is_array($header)) { if (is_array($headers)) {
$this->headers = array_merge($this->headers, $header); $this->headers = array_merge($this->headers, $headers);
} else { } else {
$this->headers[] = $header; $this->headers[] = $headers;
} }
} }
@@ -59,7 +59,7 @@ class NativeMailerHandler extends MailHandler
protected function send($content, array $records) protected function send($content, array $records)
{ {
foreach ($this->to as $to) { foreach ($this->to as $to) {
mail($to, $this->subject, wordwrap($content, 70), implode("\r\n", $this->headers)); mail($to, $this->subject, wordwrap($content, 70), implode("\r\n", $this->headers) . "\r\n");
} }
} }
} }