From 394a014b635238518511e1c86ecdbdbe70593c5c Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" <> Date: Fri, 3 Nov 2006 07:31:59 +0000 Subject: Bug 353711: Move to Email:: modules for email sending Patch By Max Kanat-Alexander r=glob, a=myk --- Bugzilla/Config.pm | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'Bugzilla/Config.pm') 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); -- cgit v1.2.3-24-g4f1b