summaryrefslogtreecommitdiffstats
path: root/post_bug.cgi
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2006-10-17 15:20:35 +0200
committermkanat%bugzilla.org <>2006-10-17 15:20:35 +0200
commit1d5410c712a3cf152c54c597c50894e482bcd0f2 (patch)
tree7a727d45734e100e9995703d8b66939a1f447b3c /post_bug.cgi
parentfcd10254fead1576d691b3a0ba212c67239c0b3e (diff)
downloadbugzilla-1d5410c712a3cf152c54c597c50894e482bcd0f2.tar.gz
bugzilla-1d5410c712a3cf152c54c597c50894e482bcd0f2.tar.xz
Bug 350921: [email_in] Create an email interface that can create a bug in Bugzilla
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=colin, r=ghendricks, a=myk
Diffstat (limited to 'post_bug.cgi')
-rwxr-xr-xpost_bug.cgi14
1 files changed, 10 insertions, 4 deletions
diff --git a/post_bug.cgi b/post_bug.cgi
index 74da0fd00..59c079897 100755
--- a/post_bug.cgi
+++ b/post_bug.cgi
@@ -29,6 +29,7 @@ use lib qw(.);
use Bugzilla;
use Bugzilla::Attachment;
+use Bugzilla::BugMail;
use Bugzilla::Constants;
use Bugzilla::Util;
use Bugzilla::Error;
@@ -243,8 +244,13 @@ if ($token) {
("createbug:$id", $token));
}
-print $cgi->header();
-$template->process("bug/create/created.html.tmpl", $vars)
- || ThrowTemplateError($template->error());
-
+if (Bugzilla->usage_mode == USAGE_MODE_EMAIL) {
+ Bugzilla::BugMail::Send($id, $vars->{'mailrecipients'});
+}
+else {
+ print $cgi->header();
+ $template->process("bug/create/created.html.tmpl", $vars)
+ || ThrowTemplateError($template->error());
+}
+1;