aboutsummaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
Diffstat (limited to 'engine')
-rw-r--r--engine/lib/notification.php11
-rw-r--r--engine/lib/users.php2
2 files changed, 10 insertions, 3 deletions
diff --git a/engine/lib/notification.php b/engine/lib/notification.php
index 1b466ecc3..838f776a2 100644
--- a/engine/lib/notification.php
+++ b/engine/lib/notification.php
@@ -238,8 +238,15 @@
else*/
$from = 'noreply@' . get_site_domain($CONFIG->site_guid); // Handle a fallback
- $headers = "From: $from\r\n";
-
+ mb_internal_encoding('UTF-8');
+ $site = get_entity($CONFIG->site_guid);
+ $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");
+
return mail($to, $subject, wordwrap($message), $headers);
}
diff --git a/engine/lib/users.php b/engine/lib/users.php
index 9a4ce2995..690a582d7 100644
--- a/engine/lib/users.php
+++ b/engine/lib/users.php
@@ -912,7 +912,7 @@
$link = $CONFIG->site->url . "action/email/confirm?u=$user_guid&c=" . generate_email_validation_code($user_guid, $user->email);
// Send validation email
- return notify_user($user->guid, $CONFIG->site->guid, elgg_echo('email:validate:subject'), sprintf(elgg_echo('email:validate:body'), $user->username, $link), NULL, 'email');
+ return notify_user($user->guid, $CONFIG->site->guid, sprintf(elgg_echo('email:validate:subject'), $user->username), sprintf(elgg_echo('email:validate:body'), $user->name, $link), NULL, 'email');
}