diff options
Diffstat (limited to 'Bugzilla/BugMail.pm')
-rw-r--r-- | Bugzilla/BugMail.pm | 21 |
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; |