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:25:13 +02:00
parent 93f814d721
commit 5ac0d070b7

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'
); );
/** /**
@@ -31,18 +31,18 @@ class NativeMailerHandler extends MailHandler
* @param string $subject The subject of the mail * @param string $subject The subject of the mail
* @param string $from The sender of the mail * @param string $from The sender of the mail
* @param integer $level The minimum logging level at which this handler will be triggered * @param integer $level The minimum logging level at which this handler will be triggered
* @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not * @param boolean $bubble Whether the messages that are handled can bubble up the stack or not
*/ */
public function __construct($to, $subject, $from, $level = Logger::ERROR, $bubble = true) public function __construct($to, $subject, $from, $level = Logger::ERROR, $bubble = true)
{ {
parent::__construct($level, $bubble); parent::__construct($level, $bubble);
$this->to = is_array($to) ? $to : array($to); $this->to = is_array($to) ? $to : array($to);
$this->subject = $subject; $this->subject = $subject;
$this->headers[] = sprintf("From: %s", $from); $this->headers[] = sprintf('From: %s', $from);
} }
/** /**
* @param string|array $header * @param string|array $header Custom added headers
*/ */
public function addHeader($headers) public function addHeader($headers)
{ {