]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 284629 : Combine Param(enable_mail_sending) with Param(maildeliverymethod)
authortravis%sedsystems.ca <>
Thu, 10 Mar 2005 01:10:00 +0000 (01:10 +0000)
committertravis%sedsystems.ca <>
Thu, 10 Mar 2005 01:10:00 +0000 (01:10 +0000)
Patch by Shane H. W. Travis <travis@sedsystems.ca>  r=Jake  a=myk

Bugzilla/BugMail.pm
checksetup.pl
defparams.pl

index a0c11ef204771a410e947c394bff6cdac46fa063..1221dcfbc4c3291bcebb4f01625d1815f05a3849 100644 (file)
@@ -883,17 +883,17 @@ sub NewProcessOnePerson ($$$$$$$$$$$$$) {
 
 sub MessageToMTA ($) {
     my ($msg) = (@_);
-    return unless Param('enable_mail_sending');
+    return if (Param('mail_delivery_method') eq "none");
 
     my @args;
-    if (Param("maildeliverymethod") eq "sendmail" && !Param("sendmailnow")) {
+    if (Param("mail_delivery_method") eq "sendmail" && !Param("sendmailnow")) {
         push @args, "-ODeliveryMode=deferred";
     }
-    if (Param("maildeliverymethod") eq "smtp") {
+    if (Param("mail_delivery_method") eq "smtp") {
         push @args, Server => Param("smtpserver");
     }
-    my $mailer = new Mail::Mailer Param("maildeliverymethod"), @args;
-    if (Param("maildeliverymethod") eq "testfile") {
+    my $mailer = new Mail::Mailer Param("mail_delivery_method"), @args;
+    if (Param("mail_delivery_method") eq "testfile") {
         $Mail::Mailer::testfile::config{outfile} = "$datadir/mailer.testfile";
     }
     
index 7fda5c9785959af10a2a39968f10360aceba817a..1464e8516370ffe146607f1daa1ca99b16f673a8 100755 (executable)
@@ -1282,10 +1282,10 @@ if (@oldparams) {
     close PARAMFILE;
 }
 
-# Set maildeliverymethod to SMTP and prompt for SMTP server
+# Set mail_delivery_method to SMTP and prompt for SMTP server
 # if running on Windows and set to sendmail (Mail::Mailer doesn't
 # support sendmail on Windows)
-if ($^O =~ /MSWin32/i && Param('maildeliverymethod') eq 'sendmail') {
+if ($^O =~ /MSWin32/i && Param('mail_delivery_method') eq 'sendmail') {
     print "\nBugzilla requires an SMTP server to function on Windows.\n" .
         "Please enter your SMTP server's hostname: ";
     my $smtp = $answer{'SMTP_SERVER'} 
@@ -1296,7 +1296,7 @@ if ($^O =~ /MSWin32/i && Param('maildeliverymethod') eq 'sendmail') {
         print "\nWarning: No SMTP Server provided, defaulting to localhost\n";
         $smtp = 'localhost';
     }
-    SetParam('maildeliverymethod', 'smtp');
+    SetParam('mail_delivery_method', 'smtp');
     SetParam('smtpserver', $smtp);
 }
 
index b31f183979a2b5d0cd1c0a1bada55afb61a98ed7..af5715235e7d9742cbbba54d43752728ce56570d 100644 (file)
@@ -671,24 +671,20 @@ sub find_languages {
   },
 
   {
-   name => 'enable_mail_sending',
-   desc => 'If set to \'Off\', Bugzilla will not send out any email of any ' .
-           'type whatsoever.<br>For most administrators, it is useful to ' .
-           'be able to disable all mail during testing and initial setup, ' .
-           'but other than that they will want to leave it \'On\'.',
-   type => 'b',
-   default => 1
-  },
-
-  {
-   name => 'maildeliverymethod',
-   desc => 'The method used for mail delivery. The testfile method ' .
-           'is useful for debugging (for more information see the ' .
-           'Mail::Mailer manual)',
+   name => 'mail_delivery_method',
+   desc => 'Defines how email is sent, or if it is sent at all.<br><ul>' .
+           '<li>\'sendmail\', \'smtp\' and \'qmail\' are all MTAs. ' .
+           '(only SMTP is available in Windows.)</li>' .
+           '<li>\'testfile\' is useful for debugging: all email is stored' .
+           'in data/mailer.testfile instead of being sent. For more ' .
+           'information, see the Mail::Mailer manual.</li>' .
+           '<li>\'none\' will completely disable email. Bugzilla continues ' .
+           'to act as though it is sending mail, but nothing is sent or ' .
+           'stored.</li></ul>' ,
    type => 's',
    choices => $^O =~ /MSWin32/i 
-                  ? ['smtp', 'testfile']
-                  : ['sendmail', 'smtp', 'qmail', 'testfile'],
+                  ? ['smtp', 'testfile', 'none']
+                  : ['sendmail', 'smtp', 'qmail', 'testfile', 'none'],
    default => 'sendmail',
    checker => \&check_multi
   },