From 4e2bfc82a0a1d70e3e0e79d27b9bcee8dfc25077 Mon Sep 17 00:00:00 2001 From: "gerv%gerv.net" <> Date: Sat, 1 Jan 2005 21:44:15 +0000 Subject: Bug 59351 - move all calls to sendmail to a central place. Patch by mkanat; r=gerv,vladd; a=justdave. --- whineatnews.pl | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'whineatnews.pl') diff --git a/whineatnews.pl b/whineatnews.pl index b5fd020a9..8e73e1b6d 100755 --- a/whineatnews.pl +++ b/whineatnews.pl @@ -31,6 +31,8 @@ use strict; require "globals.pl"; +use Bugzilla::BugMail; + SendSQL("select bug_id,short_desc,login_name from bugs,profiles where " . "(bug_status = 'NEW' or bug_status = 'REOPENED') and " . "to_days(now()) - to_days(delta_ts) > " . Param('whinedays') . @@ -68,10 +70,7 @@ foreach my $email (sort (keys %bugs)) { $msg .= " -> ${urlbase}show_bug.cgi?id=$i\n"; } - my $sendmailparam = Param('sendmailnow') ? '' : "-ODeliveryMode=deferred"; - open SENDMAIL, "|/usr/lib/sendmail $sendmailparam -t -i" - or die "Can't open sendmail"; - print SENDMAIL $msg; - close SENDMAIL; + Bugzilla::BugMail::MessageToMTA($msg); + print "$email " . join(" ", @{$bugs{$email}}) . "\n"; } -- cgit v1.2.3-24-g4f1b