Hi,
while working on
https://bugzilla.mozilla.org/show_bug.cgi?id=1518025
I'm trying to understand how MessageCompose is done in Thunderbird. Some
questions came up, as usual, the more you learn about some area the more
questions you've got.
Message-Compose is done after a preparation in
mailCommands.js:ComposeMessage in
nsMsgComposeService::OpenComposeWindow. At this point Drafts, Templates
and EditAsNew messages are parsed through a mime reader
(LoadDraftOrTemplate) and Reply-Messages are opened via
OpenComposeWindowWithParams without parsing the complete message.
Having the message not parsed completely on Replys has different effects.
Assume for instance you only show headers for your IMAP-mails and
prevent previews of the message by hiding the preview area. If you try
to forward such a message, everything will be ok. If you are going to
reply, you will end with an empty message without some recipient in your
compose-window (tested with daily 71.0a1)
Question: Is there a special reason why there are different ways for
Templates-etc. and Reply's?
I've also run into issues with the pre-selected identity via
mailCommands.js:ComposeMessage->findDeliveredToIdentityEmail . Probably
nobody uses a "delivered-to" header, but if you do, the detection of
this header and therefore the selected identity for your Reply is
dependent on your display settings as well. No preview, no header,
different identity.
Is there anybody who can help me understanding the Why and WhyNots of
MessageCompose?
Best regards, Rene