Enable E-Mail Message for Notification of Action being taken on a queued item.

This commit is contained in:
psychoticwolf%carolina.rr.com 2004-12-13 01:11:06 +00:00
parent 6e6e39dde1
commit 7dbd01565e

View File

@ -1,7 +1,5 @@
<?php
return;
//From the change password function of usermanager
// This message is called to inform the user of an administrative reset of their password.
// This message is called to inform the user of action being taken on a queued item listing.
//--- Send via E-Mail Message ---
@ -10,28 +8,33 @@ $from_address = "update-daemon@mozilla.org";
//Send To Address
$to_address = "$email";
//Get E-Mail Addresses of the Authors of this item.
$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 .= "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);
}
?>