When creating a new mail from an external program (e.g. Libreoffice), then the global preference of only text editing is overridden
Categories
(Thunderbird :: Message Compose Window, defect)
Tracking
(thunderbird_esr6869+ fixed, thunderbird70 fixed, thunderbird71 fixed)
People
(Reporter: oliver.brendel, Assigned: jorgk-bmo)
Details
Attachments
(1 file)
1.96 KB,
patch
|
aceman
:
review+
jorgk-bmo
:
approval-comm-beta+
jorgk-bmo
:
approval-comm-esr68+
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:65.0) Gecko/20100101 Firefox/65.0
Steps to reproduce:
I used "send by mail" menu point in libreoffice writer to send a document by email. This opens a new mail message compose window in Thunderbird. I have the option "writing mails in HTML" unchecked, as I want to only send text emails.
Actual results:
However when the new mail window is opened from an external program, as described above, then the HTML mode is on and the email is send as HTML.
Expected results:
Also when opening a new email from an external program, the global option about how to write emails (HTML or text) should be conserved, text in my case.
Assignee | ||
Comment 1•5 years ago
|
||
I can see this behaviour in TB 68 as well. Relevant code around:
https://searchfox.org/comm-central/search?q=GetForcePlainText&case=false®exp=false&path=
https://searchfox.org/comm-central/search?q=SetForcePlainText&redirect=false
That's been looked at in bug 1095629 and bug 1366196 and it's still not right :-(
I thought the right decision is taken here:
https://searchfox.org/comm-central/rev/7b9c1cbd595fe0ddc6c5f11c8394ea32036cfaba/mailnews/mapi/mapihook/src/msgMapiHook.cpp#902
The funny thing is, and that was tested back then, that in Windows "Send to > Mail recipient" does obey the format setting. I wonder why it doesn't work when received from LibreOffice.
Needs more debugging.
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 2•5 years ago
|
||
This needed a rainy Sunday afternoon/evening ... and it's pouring. Turns out that LibreOffice doesn't send a body so our HTML detection isn't triggered and we don't use the default composition format, that's HTML or plaintext, but always HMTL. Patch coming.
Assignee | ||
Comment 3•5 years ago
|
||
Hi Aceman, I know you're not on Windows, so you can't test this. However, you very successfully reviewed bug 1366196. All you need to know is that we want to "force plaintext" if no HTML is found in the message body. Sadly the case where there was no body was overlooked. So if there's no body, we also want to "force plaintext".
The trick is that "plaintext" is later turned into the default compose format here:
https://searchfox.org/comm-central/rev/25ea1af1ce1311e386eacd554299517e4cf84709/mailnews/mapi/mapihook/src/msgMapiHook.cpp#904
And that's exactly what we need.
This code as worked correctly since bug 1366196 for sending a file from Windows via a context menu "Send to > Mail recipient". In this case we get a plaintext body:
Your message is ready to be sent with the following file or link attachments: ...
I tested with sending a document from LibreOffice. It now works find an honours the default compose format.
Comment on attachment 9094473 [details] [diff] [review] 1536477-no-body.patch Review of attachment 9094473 [details] [diff] [review]: ----------------------------------------------------------------- OK, if this then uses the user's default format (HTML or plain text), not force plain text for the composition.
Assignee | ||
Updated•5 years ago
|
Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/f3f61fcc001a
When no body is supplied via MAPI, honour default compose format. r=aceman
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 6•5 years ago
|
||
TB 68.1.1 ESR:
https://hg.mozilla.org/releases/comm-esr68/rev/4ef7f08fca0354c40b805f2767efc66f7ddbf9e4
Assignee | ||
Comment 8•5 years ago
|
||
TB 70 beta 3:
https://hg.mozilla.org/releases/comm-beta/rev/038ae53b9865ed861e01a321f10b2a02098cbe22
Description
•