From b453e16668c70b0eb02b5ae69cd3196d735421f8 Mon Sep 17 00:00:00 2001 From: Bruno BarĂ£o Date: Tue, 14 Aug 2012 18:40:18 +0100 Subject: Fix email headers when using long email subjects and \r\n as crlf. --- system/libraries/Email.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'system/libraries/Email.php') diff --git a/system/libraries/Email.php b/system/libraries/Email.php index 8fd7a79e7..b922cb1c0 100644 --- a/system/libraries/Email.php +++ b/system/libraries/Email.php @@ -1228,7 +1228,7 @@ class CI_Email { // wrap each line with the shebang, charset, and transfer encoding // the preceding space on successive lines is required for header "folding" - return trim(preg_replace('/^(.*)$/m', ' =?'.$this->charset.'?Q?$1?=', $output.$temp)); + return trim(preg_replace('/^(.*?)(\n|\r)*$/m', ' =?'.$this->charset.'?Q?$1?=$2', $output.$temp)); } // -------------------------------------------------------------------- -- cgit v1.2.3-24-g4f1b