|
From: Benjamin C. <bc...@us...> - 2004-07-03 12:58:22
|
Update of /cvsroot/phpbt/phpbt In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5709 Modified Files: Tag: htmltemplates bug.php Log Message: Switched the change mailing code to use htmlMimeMail. Index: bug.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/bug.php,v retrieving revision 1.134.2.5 retrieving revision 1.134.2.6 diff -u -r1.134.2.5 -r1.134.2.6 --- bug.php 20 Jun 2004 23:14:23 -0000 1.134.2.5 +++ bug.php 3 Jul 2004 12:58:13 -0000 1.134.2.6 @@ -270,25 +270,27 @@ // Later add a watcher (such as QA person) check here if (count($maillist)) { - if ($toemail = delimit_list(', ',$maillist)) { - $t->assign(array( - 'bugid' => $buginfo['bug_id'], - 'siteroot' => INSTALL_URL, - 'bugurl' => INSTALL_URL."/bug.php?op=show&bugid={$buginfo['bug_id']}", - 'priority' => $select['priority'][(!empty($cf['priority']) - ? $cf['priority'] : $buginfo['priority'])], - 'priority_stat' => !empty($cf['priority']) ? '!' : ' ', - 'reporter' => $reporter, - 'reporter_stat' => $reporterstat, - 'assignedto' => $assignedto, - 'assignedto_stat' => $assignedtostat - )); - - qp_mail($toemail,"[Bug {$buginfo['bug_id']}] ".($newbug ? 'New' : 'Changed').' - '. - stripslashes((!empty($cf['title']) ? $cf['title'] : $buginfo['title'])), - $t->fetch($template), - sprintf("From: %s\nReply-To: %s\nErrors-To: %s", ADMIN_EMAIL, ADMIN_EMAIL, ADMIN_EMAIL)); - } + $t->assign(array( + 'bugid' => $buginfo['bug_id'], + 'siteroot' => INSTALL_URL, + 'bugurl' => INSTALL_URL."/bug.php?op=show&bugid={$buginfo['bug_id']}", + 'priority' => $select['priority'][(!empty($cf['priority']) + ? $cf['priority'] : $buginfo['priority'])], + 'priority_stat' => !empty($cf['priority']) ? '!' : ' ', + 'reporter' => $reporter, + 'reporter_stat' => $reporterstat, + 'assignedto' => $assignedto, + 'assignedto_stat' => $assignedtostat + )); + + require_once('./inc/htmlMimeMail/htmlMimeMail.php'); + $mail = new htmlMimeMail(); + $mail->setText($t->fetch($template)); + $mail->setFrom(ADMIN_EMAIL); + $mail->setSubject("[Bug {$buginfo['bug_id']}] ". + ($newbug ? 'New' : 'Changed').' - '. + stripslashes((!empty($cf['title']) ? $cf['title'] : $buginfo['title']))); + $mail->send($maillist); } } |