From d49484c9a65681f0ee41490c098a0b4d7a938c0e Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Sun, 1 Feb 2009 03:55:40 +0000 Subject: Update the handling of the to field if the input field is an array --- core/libraries/Sendmail.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core/libraries') diff --git a/core/libraries/Sendmail.php b/core/libraries/Sendmail.php index 27efb1fd..3da641ed 100644 --- a/core/libraries/Sendmail.php +++ b/core/libraries/Sendmail.php @@ -55,7 +55,7 @@ class Sendmail_Core { public function __call($key, $value) { switch ($key) { case "to": - $this->to = is_array($value) ? $value : array($value); + $this->to = is_array($value[0]) ? $value[0] : array($value[0]); break; case "header": if (count($value) != 2) { @@ -86,7 +86,7 @@ class Sendmail_Core { $headers[] = "$key: $value"; } $headers = implode("\r\n", $headers); - $message = wordwrap($this->message, $this->line_length, "\r\n"); + $message = wordwrap($this->message, $this->line_length, "\n"); if (!TEST_MODE) { if (!mail($to, $this->subject, $this->message, $headers)) { -- cgit v1.2.3