When saving / sending mail, we use nsIDocumentEncoder with nsIDocumentEncoder::OutputFormatted. nsIDocumentEncoder::OutputFormatted insert line break per wrap length. So when composing mail then saving it as draft, line break may be unfortunately inserted. So we should use nsIDocumentEncoder::OutputRaw when saving as draft. When sending mail, nsMsgComposeAndSend is re-created, so we should use OutputFormatted with deliver mode only. And force text mode, HTML text will be converted in nsMsgAttachmentHandler::UrlExit(). So we keep raw mode for format=flowed.
Joshua, can you comment?
2 years ago