summaryrefslogtreecommitdiffstats
path: root/whineatnews.pl
diff options
context:
space:
mode:
authorgerv%gerv.net <>2005-01-01 22:44:15 +0100
committergerv%gerv.net <>2005-01-01 22:44:15 +0100
commit4e2bfc82a0a1d70e3e0e79d27b9bcee8dfc25077 (patch)
tree7995ebb2391debcd774e93aab16411e04df8e28d /whineatnews.pl
parentb9cfd23ffdca5cf3efc90f19471c553085f4c913 (diff)
downloadbugzilla-4e2bfc82a0a1d70e3e0e79d27b9bcee8dfc25077.tar.gz
bugzilla-4e2bfc82a0a1d70e3e0e79d27b9bcee8dfc25077.tar.xz
Bug 59351 - move all calls to sendmail to a central place. Patch by mkanat; r=gerv,vladd; a=justdave.
Diffstat (limited to 'whineatnews.pl')
-rwxr-xr-xwhineatnews.pl9
1 files changed, 4 insertions, 5 deletions
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";
}