I am developing an add-on for Thunderbird in which I create my own header. This header can have different value depending of the situation.
If I receive an email with this header and I decide to reply to this email, I would like to transfer this header to my reply email in order to display it in the “MsgHeadersToolbar” using Javascript.
I know how to create my custom field in the “MsgHeadersToolbar” but I don’t know if it is possible to transfer a header. Do you have any advice about this ?
I have finally find a solution by using the FUEL library. It has a storage property which can store data globally and allow the user to get them in another xul page.
To set a data:
And to get this data:
Where “data” is the data you want to store, “keyname” is the string used to identify the data and “default” is the value to return if keyname does not exists.
What is the high level goal you are attempting to accomplish with your header?
Headers are public to anyone who has received the message, so if the functionality is really only for your user, then the global database may be a more appropriate mechanism for you to use if you just want to understand the relationship between the replied-to message and the reply because the global database establishes conversation relationships, allowing you to easily access the other messages in the conversation. Then, any additional local-only properties (or private-to-the-user’s IMAP server IMAP tags/labels) you set on the nsIMsgDBHdr can be accessed.
If you really want to propagate public header information to a reply, you are going to want to hook the compose process.
These headers are here to be public to anyone and to allow the sender and receiver to manage their mails depending of the value of these headers.
So I am more interested in the compose process.