]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 178370 : global param for whether or not to send mail
authortravis%sedsystems.ca <>
Tue, 1 Mar 2005 04:51:24 +0000 (04:51 +0000)
committertravis%sedsystems.ca <>
Tue, 1 Mar 2005 04:51:24 +0000 (04:51 +0000)
Patch by Shane H. W. Travis <travis@sedsystems.ca>   r=LpSolit  a=myk

Bugzilla/BugMail.pm
defparams.pl

index b4b0c9dfe2ef25b7c42b0b8dce7493e492133911..a0c11ef204771a410e947c394bff6cdac46fa063 100644 (file)
@@ -59,9 +59,6 @@ if ($2) {
     $sitespec = "-$2$sitespec"; # Put the port number back in, before the '@'
 }
 
-# disable email flag for offline debugging work
-my $enableSendMail = 1;
-
 my %force;
 
 my %seen;
@@ -886,7 +883,7 @@ sub NewProcessOnePerson ($$$$$$$$$$$$$) {
 
 sub MessageToMTA ($) {
     my ($msg) = (@_);
-    return unless $enableSendMail;
+    return unless Param('enable_mail_sending');
 
     my @args;
     if (Param("maildeliverymethod") eq "sendmail" && !Param("sendmailnow")) {
index d5c46c9f4834703dcb2c6ad8ec82ef9b98e5e0e7..b3ded03f75bedf8b9a8db47ad794e2a520e1c5f5 100644 (file)
@@ -670,6 +670,16 @@ sub find_languages {
    default => ''
   },
 
+  {
+   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 ' .