aboutsummaryrefslogtreecommitdiff
path: root/engine/lib
diff options
context:
space:
mode:
authormarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-08-08 15:39:59 +0000
committermarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-08-08 15:39:59 +0000
commit1d1116812d1f0d18e9ca65022dcc52c6c815967d (patch)
tree6df83efeccf2820a1c4be8454c413300acc7c51b /engine/lib
parent82979412639028b225dd1f78dd277c2c9a8c5a7a (diff)
downloadelgg-1d1116812d1f0d18e9ca65022dcc52c6c815967d.tar.gz
elgg-1d1116812d1f0d18e9ca65022dcc52c6c815967d.tar.bz2
Closes #221: Body and subject now internationalised.
git-svn-id: https://code.elgg.org/elgg/trunk@1802 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib')
-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');
}