summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Bugzilla/BugMail.pm5
-rw-r--r--defparams.pl10
2 files changed, 11 insertions, 4 deletions
diff --git a/Bugzilla/BugMail.pm b/Bugzilla/BugMail.pm
index b4b0c9dfe..a0c11ef20 100644
--- a/Bugzilla/BugMail.pm
+++ b/Bugzilla/BugMail.pm
@@ -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")) {
diff --git a/defparams.pl b/defparams.pl
index d5c46c9f4..b3ded03f7 100644
--- a/defparams.pl
+++ b/defparams.pl
@@ -671,6 +671,16 @@ 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 ' .