diff options
author | Byron Jones <bjones@mozilla.com> | 2012-01-27 09:16:33 +0100 |
---|---|---|
committer | Byron Jones <bjones@mozilla.com> | 2012-01-27 09:16:33 +0100 |
commit | df170fd24cc50966970e5e7a24bbbcfb171df978 (patch) | |
tree | f7c514184f3c128426bee2376b9ee0ddbf3b44d8 /Bugzilla/Mailer.pm | |
parent | 2de70ad630babf1fc6028697be8dd7709e47957b (diff) | |
download | bugzilla-df170fd24cc50966970e5e7a24bbbcfb171df978.tar.gz bugzilla-df170fd24cc50966970e5e7a24bbbcfb171df978.tar.xz |
Bug 715806: Correctly handle fatal sendmail errors when queuing mail
r=dkl, a=LpSolit
Diffstat (limited to 'Bugzilla/Mailer.pm')
-rw-r--r-- | Bugzilla/Mailer.pm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Bugzilla/Mailer.pm b/Bugzilla/Mailer.pm index 10a456dd6..fc51f0d47 100644 --- a/Bugzilla/Mailer.pm +++ b/Bugzilla/Mailer.pm @@ -86,7 +86,9 @@ sub MessageToMTA { my $from = $email->header('From'); my ($hostname, @args); + my $mailer_class = $method; if ($method eq "Sendmail") { + $mailer_class = 'Bugzilla::Send::Sendmail'; if (ON_WINDOWS) { $Email::Send::Sendmail::SENDMAIL = SENDMAIL_EXE; } @@ -156,7 +158,7 @@ sub MessageToMTA { else { # This is useful for both Sendmail and Qmail, so we put it out here. local $ENV{PATH} = SENDMAIL_PATH; - my $mailer = Email::Send->new({ mailer => $method, + my $mailer = Email::Send->new({ mailer => $mailer_class, mailer_args => \@args }); my $retval = $mailer->send($email); ThrowCodeError('mail_send_error', { msg => $retval, mail => $email }) |