Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[TB] customDBHeaders / Content-Type

9 views
Skip to first unread message

bennisp

unread,
Nov 4, 2009, 10:32:51 AM11/4/09
to
Hi,

I'm trying to read out the MIME content-type via getStringProperty()
according to
https://developer.mozilla.org/en/Extensions/Thunderbird/Creating_a_Custom_Column,
but it won't work (I've added "content-type" to the
mailnews.customDBHeaders preference before and rebuilt the .msf's).

After inspecting TB's sources, it seems to me TB already reads out
content-type on its own anyway, even without an customDBHeaders entry,
for some parsing purposes (e.g. whether an attachment or S/MIME stuff is
included, by looking for a multipart entry in the content-type field).
It ignores the customDBHeader preference subsequently, so the
content-type field won't be stored in the .msf.

Is there any possibility at all to get access to it?

Thx!
Ben

Kent James

unread,
Nov 4, 2009, 5:25:37 PM11/4/09
to
Looking at the relevant code near nsParseMailbox.cpp line 1626, it looks
like the character set header is cleaned up a little, then stored in the
nsIMsgDBHdr attribute Charset. So you should be able to access that
using simply hdr.Charset in js.

bennisp

unread,
Nov 5, 2009, 4:21:59 PM11/5/09
to

Thanks,
however I don't need just the charset, but rather the entire raw
content-type header. Is it possible to grab it at all?

Best, Ben

0 new messages