summaryrefslogtreecommitdiffstats
path: root/system/libraries/Email.php
diff options
context:
space:
mode:
Diffstat (limited to 'system/libraries/Email.php')
-rw-r--r--system/libraries/Email.php13
1 files changed, 11 insertions, 2 deletions
diff --git a/system/libraries/Email.php b/system/libraries/Email.php
index 1b457aee4..fa1d5e9bf 100644
--- a/system/libraries/Email.php
+++ b/system/libraries/Email.php
@@ -98,6 +98,8 @@ class CI_Email {
*/
public function __construct($config = array())
{
+ $this->charset = strtoupper(config_item('charset'));
+
if (count($config) > 0)
{
$this->initialize($config);
@@ -1107,9 +1109,16 @@ class CI_Email {
// 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'))
+ if ($this->crlf === "\r\n")
{
- return quoted_printable_encode($str);
+ if (is_php('5.3'))
+ {
+ return quoted_printable_encode($str);
+ }
+ elseif (function_exists('imap_8bit'))
+ {
+ return imap_8bit($str);
+ }
}
// Reduce multiple spaces & remove nulls