Closed Bug 1580718 Opened 3 years ago Closed 9 months ago

In spite of mail.default_html_action: `HTML only` OR `Both`, HTML mail incorrectly sent as plain text if all recipients are set as prefers-plain in AB

Categories

(Thunderbird :: Message Compose Window, defect)

defect

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: s.lazzaris, Unassigned, NeedInfo)

References

(Blocks 1 open bug)

Details

(Keywords: dataloss, ux-error-prevention, ux-mode-error)

Attachments

(1 file)

Attached file TEST TEST.mbox

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0

Steps to reproduce:

I've created a new mail, with HTML signature, and sent to different addresses

Actual results:

The mail was sent as plain text, instead of an HTML messages. This happens often but not always.
The configuration setting is ignored: it doesn't ask if I want to send as text or html even when so configured. If configured to always sent as both text and html, it sends only text anyway.
The mail is NOT mangled by the MTA and MDA: even the copy stored in the "sent" folder is text-only.

I've attached such a mail: that should have been a html message

Expected results:

We expected the mail to be multipart/alternative text - html if so configured.

Attachment #9092286 - Attachment mime type: application/mbox → text/plain

The attachment shows a plaintext mail which was possibly downgraded from a HTML composition, looks like it had a HTML signature with bold James Matthews.

There has been much confusion about the auto-downgrade and I'm actually not aware that it doesn't work. "This happens often but not always" is also a thing which would be hard to fix.

Please carefully check your configuration: In the preferences/options: Composition, General, Send Options.

"Send messages as plaintext if possible" should be unchecked to avoid accidental downgrade. However, if you have a signature with bold, that downgrade shouldn't happen.

"When sending messages in HTML format and one or more recipients are not listed as being able to receive HTML:" What have you selected there?

Are there recipients in your address book who prefer plaintext?

I've done some more tests.and maybe it's more systematic that I've previously thought.

"Send messages as plaintext if possible" is unchecked.
"When sending messages in HTML format and one or more recipients are not listed as being able to receive HTML": is set to "ask me what to do".

If in the addressbook the recipient is marked as "prefers plain text", Thunderbird doesn't ask me what to do, it sent plain text without any prompt to the user.
If I set the preference in the addressbook to "unkown", Thunderbird (correctly?) asks me what to do and if I choose "html", the mail is sent in html format.

So maybe I'm understanding this wrong, but I think that if I set "ask me what to do", when the recipient is marked as unable to receive HTML, and the recipient "prefers plain text", I was expecting a prompt that didn't appears.

Let me know if you need more informations

I've made another test, with this settigns

"Send messages as plaintext if possible": unchecked.
"When sending messages in HTML format and one or more recipients are not listed as being able to receive HTML": "send always as HTML"
In the addressbook, for the recipient, "prefers plain text".

The mail was sent as text-only. I was expecting HTML.

It seems that the addressbook setting is the highest priority, which I think is a bit unexpected. If it is the intended behaviour, maybe the phrasing should be improved?

We tried to solve this dilemma in bug 1222176, but that finally didn't go ahead. Thomas, does a single text recipient force the message to plain text?

Flags: needinfo?(bugzilla2007)

Another bit of information: we fetch (some) contacts in the addressbook from our Active Directory via LDAP. Those contacts are all marked as "prefers plain text", while the contacts collected from (as an example) the mails are set to "unkown".

I've inspected the AD but found no attribute related to that setting... maybe "plain text" become the default recently-sh?

(In reply to Jorg K (GMT+2) from comment #4)

We tried to solve this dilemma in bug 1222176, but that finally didn't go ahead. Thomas, does a single text recipient force the message to plain text?

Well, sort of. More precisely, if all recipients of the message are marked in AB as "prefers-plain" (allPlain scope), TB will do the following:

  • ignore user's send options (contrary to what the label suggests: "When sending messages in HTML format and one or more recipients are not listed as being able to receive HTML")
  • force-downgrade the message after sending, i.e. dump all HTML formatting without warning (I thought there's a bug for that, but I can't find it. Closest: bug 180997). Doing the warning might be non-trivial in the current messed-up state of affairs.

The current UI labels are misleading and erroneous, just as the underlying logics. Most options are no-op. Bug 1222176 offered a substantial cure of the status quo, but was rejected with a view on removing the recipient-centric logic of Auto-Detect entirely (which sounds like a good idea in the long run, but doesn't help until that's done). For details of what's currently wrong, see bug 1222176 comment 26.

Flags: needinfo?(bugzilla2007)
// If all recipients prefer plaintext, silently strip *all* HTML formatting,
// regardless of (non-)convertibility, and send the message as plaintext.
// **ToDo: UX-error-prevention, UX-wysiwyg: warn against dataloss potential.**
if (allPlain) {
  *result = nsIMsgCompSendFormat::PlainText;
  return NS_OK;
}

(In reply to Simone Lazzaris from comment #2)

I've done some more tests.and maybe it's more systematic that I've previously thought.

"Send messages as plaintext if possible" is unchecked.
"When sending messages in HTML format and one or more recipients are not listed as being able to receive HTML": is set to "ask me what to do".
...
So maybe I'm understanding this wrong, but I think that if I set "ask me what to do", when the recipient is marked as unable to receive HTML, and the recipient "prefers plain text", I was expecting a prompt that didn't appears.

Simone, your understanding is right. TB's UI/logic/behaviour is wrong.

(In reply to Simone Lazzaris from comment #3)

I've made another test, with this settigns

"Send messages as plaintext if possible": unchecked.
"When sending messages in HTML format and one or more recipients are not listed as being able to receive HTML": "send always as HTML"
In the addressbook, for the recipient, "prefers plain text".

The mail was sent as text-only. I was expecting HTML.

Correct expectation. TB is acting wrong by ignoring your setting.

It seems that the addressbook setting is the highest priority,

Only for cases where all recipients are marked as "prefers-plaintext" (allPlain), or allHTML. Iow, the "When sending..." setting only applies when the preference of all recipients is "unknown" or when there are several recipients with different preferences. Odd. Not what it says on the label.

which I think is a bit unexpected. If it is the intended behaviour, maybe the phrasing should be improved?

Absolutely.

Ok, we carved our way around this bug changing the settings in the ownCloud-shared addressbook (I was wrong in thinking that the addressbook is LDAP-fetched from the AD.... we are now using owncloud for that).
It would be nice to have the indented behaviour but, meanwhile, we can think of a description more fitting to the algorithm.

Hi, I have noticed the same bug. I have tested it on versions 78.14.0, 94.1.0 and 95.1.0. It is the same in all cases.

I even tried to force settings from the advanced config editor, but I haven't found a solution.

I can also confirm an easy (but tedious, because you have to do it for any single mail) workaround:
Start writing a new mail (or just reply one, it doesn't really matter) and go to: Options > Delivery Format > and there change "Auto-Detect" to "Rich Text (HTML) Only".
There is a way to disable auto-detect?

I also created a ticket on Thunderbird's support site with more details on used settings (Italian language) here https://support.mozilla.org/it/questions/1361066

(In reply to Simone Lazzaris from comment #10)

Ok, we carved our way around this bug changing the settings in the ownCloud-shared addressbook (I was wrong in thinking that the addressbook is LDAP-fetched from the AD.... we are now using owncloud for that).
It would be nice to have the indented behaviour but, meanwhile, we can think of a description more fitting to the algorithm.

Simone would you mind sharing which modification was necessary to ownlowd CardDAVs?

Thank you folks!

Flags: needinfo?(s.lazzaris)

This is a cunning dataloss bug when all of your message recipients are marked as "Prefers plaintext" in address book. Please note that we have started the removal of recipient-centric delivery options in bug 1727493, which - if done right and completely - will fix this bug. Unfortunately, the current plan as laid out in bug 1727493 comment 5 would still persist this dataloss bug for some time.

So until this is actually fixed in some way, this bug must stay open to track the current fallout.

Severity: normal → S2
Status: UNCONFIRMED → NEW
Depends on: 1727493
Ever confirmed: true
Summary: HTML mail incorrectly sent as plain text → In spite of mail.default_html_action: `HTML only` OR `Both`, HTML mail incorrectly sent as plain text if all recipients are set as prefers-plain in AB

(In reply to Julian from comment #11)

Hi, I have noticed the same bug. I have tested it on versions 78.14.0, 94.1.0 and 95.1.0. It is the same in all cases.
I even tried to force settings from the advanced config editor, but I haven't found a solution.
I also created a ticket on Thunderbird's support site with more details on used settings (Italian language) here https://support.mozilla.org/it/questions/1361066

Here's the machine translation of Julian's issue as described on SUMO:

I refer to version 78.14.0, which for now, I am not updating due to some complementary plug-ins.

However, there is no way to ALWAYS send HTML messages. Random, they ship them one way or another. Whether there is an HTML signature or not, speaking of new messages. I can send a message with the same content to the same recipient and it arrives a bit [sometimes] as plain text and a bit [sometimes] as HTML.

Usually the option I use is Tools -> composition -> General -> Send options -> "send the message in HTML anyway" and leaving crossed out [unchecked] "Send messages as plain text".

I've already used this guide to force HTML composing: https://support.mozilla.org/en-US/questions/1237817
It did not work.

I also checked in the account configuration "Composition and addresses" check on "Compose messages in HTML"

It just works like this: composing a new message:
Options -> Delivery format -> HTML formatted text only
Normally this last parameter is on "Auto". Can it be forced in some way?

I've done dozens of installations, and I'm experiencing this problem with this version.

Depends on: 1758460

Bug is fixed (or no longer applies) after bug 1758460.

Status: NEW → RESOLVED
Closed: 9 months ago
No longer depends on: 1727493
Resolution: --- → FIXED
See Also: → 1727493
Resolution: FIXED → WORKSFORME
You need to log in before you can comment on or make changes to this bug.