aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--actions/email/confirm.php2
-rw-r--r--engine/lib/notification.php11
-rw-r--r--engine/lib/users.php2
-rw-r--r--languages/en.php4
4 files changed, 13 insertions, 6 deletions
diff --git a/actions/email/confirm.php b/actions/email/confirm.php
index b11c790d7..64c2c766a 100644
--- a/actions/email/confirm.php
+++ b/actions/email/confirm.php
@@ -26,7 +26,7 @@
system_message(elgg_echo('email:confirm:success'));
$user = get_entity($user_guid);
- notify_user($user_guid, $CONFIG->site->guid, elgg_echo('email:validate:success:subject'), sprintf(elgg_echo('email:validate:success:body'), $user->username), NULL, 'email');
+ notify_user($user_guid, $CONFIG->site->guid, sprintf(elgg_echo('email:validate:success:subject'), $user->username), sprintf(elgg_echo('email:validate:success:body'), $user->name), NULL, 'email');
} else
register_error(elgg_echo('email:confirm:fail'));
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');
}
diff --git a/languages/en.php b/languages/en.php
index c01a2baab..da2d542cf 100644
--- a/languages/en.php
+++ b/languages/en.php
@@ -637,14 +637,14 @@ To view their profile, click here:
You cannot reply to this email.",
- 'email:validate:subject' => "Please confirm your email address!",
+ 'email:validate:subject' => "%s please confirm your email address!",
'email:validate:body' => "Hi %s,
Please confirm your email address by clicking on the link below:
%s
",
- 'email:validate:success:subject' => "Email validated!",
+ 'email:validate:success:subject' => "Email validated %s!",
'email:validate:success:body' => "Hi %s,
Congratulations, you have successfully validated your email address.",