From c3345fdd39795bfa1bbb8fd552bfc3e4e85c3fbb Mon Sep 17 00:00:00 2001 From: "travis%sedsystems.ca" Date: Mon, 24 Jan 2005 05:16:24 +0000 Subject: [PATCH] Bug 31314 : Support for "In-Reply-To" header in emails Patch by Marc Schumann r=jake a=myk git-svn-id: svn://10.0.0.236/trunk@168223 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/webtools/bugzilla/Bugzilla/BugMail.pm | 12 ++++++++++++ mozilla/webtools/bugzilla/defparams.pl | 7 ++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/mozilla/webtools/bugzilla/Bugzilla/BugMail.pm b/mozilla/webtools/bugzilla/Bugzilla/BugMail.pm index d9dbb770bcf..6b77f6d9410 100644 --- a/mozilla/webtools/bugzilla/Bugzilla/BugMail.pm +++ b/mozilla/webtools/bugzilla/Bugzilla/BugMail.pm @@ -46,6 +46,13 @@ my $last_changed; my @excludedAddresses = (); +my $sitespec = '@'.Param('urlbase'); +$sitespec =~ s/:\/\//\./; # Make the protocol look like part of the domain +$sitespec =~ s/^([^:\/]+):(\d+)/$1/; # Remove a port number, to relocate +if ($2) { + $sitespec = "-$2$sitespec"; # Put the port number back in, before the '@' +} + # disable email flag for offline debugging work my $enableSendMail = 1; @@ -854,6 +861,11 @@ sub NewProcessOnePerson ($$$$$$$$$$$$$) { $substs{"reasonsheader"} = join(" ", @reasons); $substs{"reasonsbody"} = $reasonsbody; $substs{"space"} = " "; + if ($isnew) { + $substs{'threadingmarker'} = "Message-ID: "; + } else { + $substs{'threadingmarker'} = "In-Reply-To: "; + } my $template = Param("newchangedmail"); diff --git a/mozilla/webtools/bugzilla/defparams.pl b/mozilla/webtools/bugzilla/defparams.pl index 206e89e591a..29c4d27ad12 100644 --- a/mozilla/webtools/bugzilla/defparams.pl +++ b/mozilla/webtools/bugzilla/defparams.pl @@ -719,13 +719,18 @@ To use the wonders of Bugzilla, you can use the following: 'getting the email, suitable for use in an email header (such ' . 'as X-Bugzilla-Reason). %reasonsbody% is replaced by text that ' . 'explains why the user is getting the email in more user ' . - 'friendly text than %reasonsheader%. %anythingelse% gets ' . + 'friendly text than %reasonsheader%. ' . + '%threadingmarker% will become either a Message-ID line (for ' . + 'new-bug messages) or a In-Reply-To line (for bug-change ' . + 'messages). ' . + '%anythingelse% gets ' . 'replaced by the definition of that parameter (as defined on ' . 'this page).', type => 'l', default => 'From: bugzilla-daemon To: %to% Subject: [Bug %bugid%] %neworchanged%%summary% +%threadingmarker% X-Bugzilla-Reason: %reasonsheader% %urlbase%show_bug.cgi?id=%bugid%