I'm encountering a problem regarding handling of attachments with Thunderbird (9.0.1, Windows 7).

I've set Thunderbird to open HTML files with Firefox. But currently, Thunderbird adds a ".xht" extension to the attachment file when saving temporarily (so, the filename "foo.html" now is "foo.html.xht") before passing it to Firefox. Thus, Firefox tries to parse the HTML file as XML and fails, since the attachments often aren't valid X(HT)ML, but old, ugly HTML.

If I save the attachment manually, Thunderbird doesn't touch the file extension, and thus Firefox doesn't have a problem displaying the "old" HTML. But when saving manually, I have to open the Windows Explorer, navigate to the download folder, and double-click manually.

So, how do I tell Thunderbird not to change the file name (especially the extension) when saving the file temporarily?


With the help of the MozillaZine Knowledge Base the problem was found to be a wrong Content-Type set by the sender - it was "application/xhtml+xml" instead of "text/html". So, the easiest solution would be to tell the sender to add a content type that fits the content.

For the mail recipient, a quick-and-dirty solution would be to modify the "mimeTypes.rtf" file that's part of the user profile. It should have an entry looking like this:

<RDF:Description RDF:about="urn:mimetype:application/xhtml+xml"
               NC:description="Firefox HTML Document">
    <NC:handlerProp RDF:resource="urn:mimetype:handler:application/xhtml+xml"/>

Changing he value of the NC:fileExtensions attribute to html will make Thunderbird save even application/xhtml+xml attachments with 'html' file extension:


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.