summaryrefslogtreecommitdiffstats
path: root/Bugzilla/BugMail.pm
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 /Bugzilla/BugMail.pm
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 'Bugzilla/BugMail.pm')
-rw-r--r--Bugzilla/BugMail.pm21
1 files changed, 15 insertions, 6 deletions
diff --git a/Bugzilla/BugMail.pm b/Bugzilla/BugMail.pm
index 0e089fa12..638b8a413 100644
--- a/Bugzilla/BugMail.pm
+++ b/Bugzilla/BugMail.pm
@@ -864,20 +864,29 @@ sub NewProcessOnePerson ($$$$$$$$$$$$$) {
my $msg = PerformSubsts($template, \%substs);
- my $sendmailparam = "-ODeliveryMode=deferred";
- if (Param("sendmailnow")) {
- $sendmailparam = "";
+ MessageToMTA($msg);
+
+ push(@sentlist, $person);
+ return 1;
+}
+
+# XXX: Should eventually add $mail_from and $mail_to options to
+# control the SMTP Envelope. -mkanat
+sub MessageToMTA ($) {
+ my ($msg) = (@_);
+
+ my $sendmailparam = "";
+ unless (Param("sendmailnow")) {
+ $sendmailparam = "-ODeliveryMode=deferred";
}
if ($enableSendMail == 1) {
open(SENDMAIL, "|/usr/lib/sendmail $sendmailparam -t -i") ||
die "Can't open sendmail";
-
+
print SENDMAIL trim($msg) . "\n";
close SENDMAIL;
}
- push(@sentlist, $person);
- return 1;
}
1;