summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Mailer.pm
diff options
context:
space:
mode:
authorByron Jones <bjones@mozilla.com>2012-01-11 09:46:24 +0100
committerByron Jones <bjones@mozilla.com>2012-01-11 09:46:24 +0100
commita46fd53966253df66b8a2d448b93eef8c0bf629a (patch)
treed3292d963ba755d18f3ff90d3d610930ac61ec40 /Bugzilla/Mailer.pm
parent4a58678de6f0cd1e25b2b3d2f3dd42e0f973f324 (diff)
downloadbugzilla-a46fd53966253df66b8a2d448b93eef8c0bf629a.tar.gz
bugzilla-a46fd53966253df66b8a2d448b93eef8c0bf629a.tar.xz
Bug 715806: deal with theschwartz sendmail errors correctly
Diffstat (limited to 'Bugzilla/Mailer.pm')
-rw-r--r--Bugzilla/Mailer.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/Bugzilla/Mailer.pm b/Bugzilla/Mailer.pm
index b8efd2931..cf494aa7f 100644
--- a/Bugzilla/Mailer.pm
+++ b/Bugzilla/Mailer.pm
@@ -111,7 +111,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;
}
@@ -180,7 +182,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 })