From a09e01d10f6b71570a5cccc62216eddec0614bec Mon Sep 17 00:00:00 2001 From: David Anderson Date: Thu, 29 Nov 2007 18:14:56 +0000 Subject: [PATCH] - web: include private message content in email notification svn path=/trunk/boinc/; revision=14321 --- checkin_notes | 6 ++++++ html/inc/pm.inc | 28 ++++++++++++++++++---------- 2 files changed, 24 insertions(+), 10 deletions(-) diff --git a/checkin_notes b/checkin_notes index 1e115c0585..2b5a51af41 100644 --- a/checkin_notes +++ b/checkin_notes @@ -11807,3 +11807,9 @@ David 29 Nov 2007 user/ edit_forum_preferences_action.php edit_forum_preferences_form.php + +David 29 Nov 2007 + - web: include private message content in email notification + + html/user/ + pm.php diff --git a/html/inc/pm.inc b/html/inc/pm.inc index f351a48b1b..51aaf7cc77 100644 --- a/html/inc/pm.inc +++ b/html/inc/pm.inc @@ -88,16 +88,24 @@ function pm_send($to, $subject, $content) { $send_email = false; if ($to_user->prefs->pm_notification) $send_email = true; BoincPrivateMessage::insert("(userid, senderid, date, subject, content) VALUES ($userid, $senderid, UNIX_TIMESTAMP(), '$sql_subject', '$sql_content')"); - if ($send_email) { // Send email notification - $message = "Dear ".$to->name.",\n\n"; - $message .= "You have received a new private message at ".PROJECT." from ".$logged_in_user->name.", entitled \"".$subject."\".\n\n"; - $message .= "To read the original version, respond to, or delete this message, you must log in here:\n"; - $message .= URL_BASE."pm.php\n\n"; - $message .= "Do not reply to this message. To disable email notification, go to\n"; - $message .= URL_BASE."prefs.php?subset=project\n"; - $message .= "and change email notification settings.\n"; - - send_email($to, "[".PROJECT."] Private message notification", $message); + if ($send_email) { + $message = " +You have received a new private message at ".PROJECT.". + +From: $logged_in_user->name (ID $logged_in_user->id) +Subject: $subject + +$content + +-------------------------- +To delete or respond to this message, visit: +".URL_BASE."pm.php + +To disable email delivery of private messages, visit: +".URL_BASE."edit_forum_preferences_form.php +Do not reply to this message. +" ; + send_email($to, "[".PROJECT."] private message", $message); } }