Open Bug 254800 Opened 20 years ago Updated 2 years ago

Add additional headers with values based upon identity

Categories

(MailNews Core :: Composition, enhancement)

enhancement

Tracking

(Not tracked)

People

(Reporter: mnyromyr, Assigned: mnyromyr)

Details

Attachments

(2 files)

[This is actually a "merging spin-off" of bug 61520 and bug 16925. I considered
taking over bug 16904 for this, but it is too fuzzy to be useful...]

We have the ability to add header/value pairs to every message, based upon
identity (bug 61520).
We have the ability to add global custom headers without values to composition
(bug 16925).
We don't have the ability to add header/value pairs to composition, based upon
identity, so I wrote a very small addon to do that
(http://mnenhy.mozdev.org/spinoff.html#valueheaders). This bug is about bringing
this into the core.

The patch will introduce and use the following pref structure:

user_pref("mail.identity.<id>.compose.headers","stan,olli");
user_pref("mail.identity.<id>.compose.header.stan","x-stan: olli");
user_pref("mail.identity.<id>.compose.header.olli","x-olli: stan");

where <id> is 'default' or one of the usual identity names.
If and only if <id> is selected in the message editor, the entries "X-Stan:
olli" and "X-Olli: stan" will appear in the addressing widget's dropdown box. If
either is selected, the respective textbox will be prefilled with the respective
value.


Patch forthcoming.
Actually, this patch makes mail.compose.other.header quite futile, because it
overlaps with header definitions with empty values for the default identity...
But it's only about 10 lines, so I left it in for backwards compatibility.
I also fixed a bug in awCleanupRows() that tried to delete non-existent
listitems.
Attachment #155679 - Flags: review?(neil.parkwaycc.co.uk)
Attachment #155679 - Flags: superreview?(bienvenu)
Product: MailNews → Core
Is this patch still viable?
Severity: normal → enhancement
OS: Windows 2000 → All
Hardware: PC → All
> Is this patch still viable?

The diff context slightly bitrotted, but looking at the rejects (only for MsgComposeCommands.js, all other still apply) there shouldn't be any other problems. I didn't do a functional test now, though.

this seems like the kind of thing that extensions would like to do...and I guess this patch makes it a lot easier for them to do that?
Yes, with (an updated version of) this patch, extensions just would have to provide the UI. 
QA Contact: composition
Product: Core → MailNews Core
Karsten, is this basically ready to go for next release?
Uh, well, depends upon 5 years of bitrot, I'd say.
And which is "the next release", of course. ;-)
Comment on attachment 155679 [details] [diff] [review]
custom header/value pairs in mail editor

clearing review request since this really needs Neil's review first. But as I said before, I like having extension hooks for this (this might be a natural thing to provide in our jetpack, but I suspect it will be a while before jetpack gets to this area).
Attachment #155679 - Flags: superreview?(bienvenu)
Karsten, looking at Neil's review queue [1], it's unlikely that this will be reviewed any time soon, less so because the patch is certainly bitrotted after almost 10 years. I suggest that you remove the review request for now until an updated version of the patch is available if you still want to pursue this. Tia.

[1] https://bugzilla.mozilla.org/request.cgi?action=queue&type=review&requestee=neil%40httl.net&group=type
Flags: needinfo?(mnyromyr)
Comment on attachment 155679 [details] [diff] [review]
custom header/value pairs in mail editor

Cancelling outdated review request per comment 10.
Attachment #155679 - Flags: review?(neil)
Flags: needinfo?(mnyromyr)
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: