aboutsummaryrefslogtreecommitdiff
path: root/engine/lib
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-08-11 15:31:33 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-08-11 15:31:33 +0000
commitdc2db5982590eb36bcd15d648f15070471833545 (patch)
treea77cdc288575f3b819b2dd6fc97fb0c80568dda5 /engine/lib
parent55af8d999acc3346992f62d0e1b01369b5965609 (diff)
downloadelgg-dc2db5982590eb36bcd15d648f15070471833545.tar.gz
elgg-dc2db5982590eb36bcd15d648f15070471833545.tar.bz2
Downgraded UTF support in the email notification function to optional
git-svn-id: https://code.elgg.org/elgg/trunk@1836 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib')
-rw-r--r--engine/lib/notification.php20
1 files changed, 14 insertions, 6 deletions
diff --git a/engine/lib/notification.php b/engine/lib/notification.php
index c483f1ed8..bdfbf65c3 100644
--- a/engine/lib/notification.php
+++ b/engine/lib/notification.php
@@ -237,15 +237,23 @@
}
else*/
$from = 'noreply@' . get_site_domain($CONFIG->site_guid); // Handle a fallback
-
- mb_internal_encoding('UTF-8');
- $site = get_entity($CONFIG->site_guid);
- $sitename = mb_encode_mimeheader($site->name,"UTF-8", "B");
+
+ if (is_callable('mb_internal_encoding')) {
+ mb_internal_encoding('UTF-8');
+ }
+ $site = get_entity($CONFIG->site_guid);
+ $sitename = $site->name;
+ if (is_callable('mb_encode_mimeheader')) {
+ $sitename = mb_encode_mimeheader($site->name,"UTF-8", "B");
+ }
$headers = "From: $sitename <$from>\r\n"
. "Content-Type: text/plain; charset=UTF-8; format=flowed\r\n"
. "MIME-Version: 1.0\r\n"
- . "Content-Transfer-Encoding: 8bit\r\n";
- $subject = mb_encode_mimeheader($subject,"UTF-8", "B");
+ . "Content-Transfer-Encoding: 8bit\r\n";
+
+ if (is_callable('mb_encode_mimeheader')) {
+ $subject = mb_encode_mimeheader($subject,"UTF-8", "B");
+ }
return mail($to, $subject, wordwrap($message), $headers);
}