summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Config.pm
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2006-11-03 08:31:59 +0100
committermkanat%bugzilla.org <>2006-11-03 08:31:59 +0100
commit394a014b635238518511e1c86ecdbdbe70593c5c (patch)
treec57be0489271f2a84bcf3eabfbc26bdaae32e8c9 /Bugzilla/Config.pm
parentc387f4db6121b465c4d10035d8082eee3c016ef0 (diff)
downloadbugzilla-394a014b635238518511e1c86ecdbdbe70593c5c.tar.gz
bugzilla-394a014b635238518511e1c86ecdbdbe70593c5c.tar.xz
Bug 353711: Move to Email:: modules for email sending
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=glob, a=myk
Diffstat (limited to 'Bugzilla/Config.pm')
-rw-r--r--Bugzilla/Config.pm17
1 files changed, 15 insertions, 2 deletions
diff --git a/Bugzilla/Config.pm b/Bugzilla/Config.pm
index 1423c1196..0859c5bee 100644
--- a/Bugzilla/Config.pm
+++ b/Bugzilla/Config.pm
@@ -171,6 +171,19 @@ sub update_params {
delete $param->{'enablequips'};
}
+ # Old mail_delivery_method choices contained no uppercase characters
+ if (exists $param->{'mail_delivery_method'}
+ && $param->{'mail_delivery_method'} !~ /[A-Z]/) {
+ my $method = $param->{'mail_delivery_method'};
+ my %translation = (
+ 'sendmail' => 'Sendmail',
+ 'smtp' => 'SMTP',
+ 'qmail' => 'Qmail',
+ 'testfile' => 'Test',
+ 'none' => 'None');
+ $param->{'mail_delivery_method'} = $translation{$method};
+ }
+
# --- DEFAULTS FOR NEW PARAMS ---
_load_params unless %params;
@@ -216,7 +229,7 @@ sub update_params {
}
if (ON_WINDOWS && !-e SENDMAIL_EXE
- && $param->{'mail_delivery_method'} eq 'sendmail')
+ && $param->{'mail_delivery_method'} eq 'Sendmail')
{
my $smtp = $answer->{'SMTP_SERVER'};
if (!$smtp) {
@@ -233,7 +246,7 @@ sub update_params {
}
}
- $param->{'mail_delivery_method'} = 'smtp';
+ $param->{'mail_delivery_method'} = 'SMTP';
}
write_params($param);