From 7dbd01565ead228f5c4ba84dc9b10e9ab0af14ec Mon Sep 17 00:00:00 2001 From: "psychoticwolf%carolina.rr.com" Date: Mon, 13 Dec 2004 01:11:06 +0000 Subject: [PATCH] Enable E-Mail Message for Notification of Action being taken on a queued item. --- webtools/update/developers/mail_approval.php | 47 +++++++++++--------- 1 file changed, 25 insertions(+), 22 deletions(-) diff --git a/webtools/update/developers/mail_approval.php b/webtools/update/developers/mail_approval.php index f0bd337889d7..3a43dc4e69d5 100755 --- a/webtools/update/developers/mail_approval.php +++ b/webtools/update/developers/mail_approval.php @@ -1,7 +1,5 @@ \r\n"; -//$headers .= "Reply-To: ".$from_name." <".$from_address.">\r\n"; -$headers .= "X-Priority: 3\r\n"; -$headers .= "X-MSMail-Priority: Normal\r\n"; -$headers .= "X-Mailer: Mozilla Update Mail System 1.0"; +$sql = "SELECT `email` FROM `authorxref` TAX INNER JOIN `userprofiles` TU ON TAX.UserID=TU.UserID WHERE TAX.ID='$id'"; +$sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); + while ($row = mysql_fetch_array($sql_result)) { -$subject = "Your New Mozilla Update Password\n"; - $message = "Your New Mozilla Update Password\n"; - $message .= "Below is your new Mozilla Update password which has been either changed by you using the Change Password tool, or regenerated as requested by you using the Mozilla Update Forgotten Password tool or by an Mozilla Update Staff member per your request.\n"; - $message .= "To login to your account, click the link below or copy and paste the whole thing into your browsers location bar:\n"; - $message .= "http://$_SERVER[HTTP_HOST]/developers/\n\n"; - $message .= "Keep this e-mail in a safe-place for your records, below is your account details you used when registering for your account.\n\n"; - $message .= "E-Mail: $email\n"; - $message .= "Password: $password_plain\n\n"; - $message .= "Thanks,\n"; - $message .= "-- Mozilla Update Staff\n"; + $to_address = $row["email"]; -mail($to_address, $subject, $message, $headers); + $headers .= "MIME-Version: 1.0\r\n"; + $headers .= "Content-type: text/plain; charset=iso-8859-1\r\n"; + $headers .= "From: ".$from_name." <".$from_address.">\r\n"; + $headers .= "X-Priority: 3\r\n"; + $headers .= "X-MSMail-Priority: Normal\r\n"; + $headers .= "X-Mailer: Mozilla Update Mail System 1.0"; + $subject = "[$name $version] $action_email \n"; + + $message = "$name $version - $action_email\n"; + $message .= "Your item, $name $version, has been reviewed by a Mozilla Update editor who took the following action:\n"; + $message .= "$action_email\n\n"; + $message .= "Your item was tested by the editor using $testbuild on $testos.\n"; + $message .= "Editor's Comments:\n $comments\n"; + $message .= "----\n"; + $message .= "Mozilla Update: https://$sitehostname/\n"; + + mail($to_address, $subject, $message, $headers); + +} ?> \ No newline at end of file