summaryrefslogtreecommitdiffstats
path: root/system/libraries/Email.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-10-09 14:00:00 +0200
committerAndrey Andreev <narf@bofh.bg>2012-10-09 14:00:00 +0200
commit683b34d6dfcc10bee7703af605875df9229c2bea (patch)
treeebef117f49650552204aecd7dbc417cc9bcfb427 /system/libraries/Email.php
parent9df35b4d23848e831ead765712addd0b845fd8f4 (diff)
Alter CI_Emai::_prep_quoted_printable()
Diffstat (limited to 'system/libraries/Email.php')
-rw-r--r--system/libraries/Email.php13
1 files changed, 10 insertions, 3 deletions
diff --git a/system/libraries/Email.php b/system/libraries/Email.php
index 36bdd1f22..36ecc347d 100644
--- a/system/libraries/Email.php
+++ b/system/libraries/Email.php
@@ -980,7 +980,6 @@ class CI_Email {
$this->_finalbody = $body.$this->_prep_quoted_printable($this->_body).$this->newline.$this->newline;
-
if ($this->_get_protocol() === 'mail')
{
$this->_header_str .= $hdr;
@@ -1100,11 +1099,19 @@ class CI_Email {
* Refer to RFC 2045 http://www.ietf.org/rfc/rfc2045.txt
*
* @param string
- * @param int
* @return string
*/
- protected function _prep_quoted_printable($str, $charlim = '')
+ protected function _prep_quoted_printable($str)
{
+ // RFC 2045 specifies CRLF as "\r\n".
+ // However, many developers choose to override that and violate
+ // the RFC rules due to (apparently) a bug in MS Exchange,
+ // which only works with "\n".
+ if ($this->crlf === "\r\n" && is_php('5.3'))
+ {
+ return quoted_printable_encode($str);
+ }
+
// Set the character limit
// Don't allow over 76, as that will make servers and MUAs barf
// all over quoted-printable data