]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 384497: Add a parameter that enables debug mode for SMTP
authormkanat%bugzilla.org <>
Sun, 17 Jun 2007 23:58:14 +0000 (23:58 +0000)
committermkanat%bugzilla.org <>
Sun, 17 Jun 2007 23:58:14 +0000 (23:58 +0000)
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=mkanat

Bugzilla/Config/MTA.pm
Bugzilla/Mailer.pm
template/en/default/admin/params/mta.html.tmpl

index 3415677f3acca4ad4d113ec53aaf07ab1b2237d2..686d5b3e426f2a9db9eb1bb3b3edc42b1f929c3a 100644 (file)
@@ -68,7 +68,11 @@ sub get_param_list {
    type => 't',
    default => 'localhost'
   },
-
+  {
+   name => 'smtp_debug',
+   type => 'b',
+   default => 0
+  },
   {
    name => 'whinedays',
    type => 't',
index 1d4a90a4f6dc9c73725c62f3d662d98678ed3972..ab54ecfea9ba9d9a55c0eb38dfbdb2b9b20b1d20 100644 (file)
@@ -100,7 +100,8 @@ sub MessageToMTA {
 
     if ($method eq "SMTP") {
         push @args, Host  => Bugzilla->params->{"smtpserver"},
-                    Hello => $hostname;
+                    Hello => $hostname, 
+                    Debug => Bugzilla->params->{'smtp_debug'};
     }
 
     if ($method eq "Test") {
index 778f81d0aadce3333011677d20145014fc916a22..7af38ed6d489219bba59874677376768c3edd855 100644 (file)
 
   smtpserver => "The SMTP server address (if using SMTP for mail delivery).",
 
+  smtp_debug => "If enabled, this will print detailed information to your" _
+                " web server's error log about the communication between" _
+                " $terms.Bugzilla and your SMTP server. You can use this to" _
+                " troubleshoot email problems.",
+
   whinedays => "The number of days that we'll let a $terms.bug sit untouched in a NEW " _
                "state before our cronjob will whine at the owner.<br> " _
                "Set to 0 to disable whining.",