Open Bug 180997 Opened 24 years ago Updated 4 months ago

Inline images or embedded local files silently stripped without trace when force-sending HTML message in plaintext mode (Options > Format > Plain Text only: img lost; need warning and/or conversion into attachments)

Categories

(MailNews Core :: Composition, defect)

defect
Not set
critical

Tracking

(Not tracked)

People

(Reporter: bugzilla, Unassigned)

References

(Blocks 3 open bugs, )

Details

(Keywords: dataloss, helpwanted)

1) Open a message in HTML 2) Insert one or more images 3) go to menu options/format and select plain text only 4) send the message ==>The recipient will receive only the message body converted to plain text. The image[s] are lost. This is a scenario which append more than expected, in real life the user does not change the send format but the message get automatically converted to plain text because the recipient is listed to accept only plain text. 4.x has the same issue but I thing we should do a better job. The proposed solution would be to sent the embedded images as attachment, using the alternative text or the url of the image as attachment name. Another problem covered by bug 180991 is that the plain text comversion of images is poor which make almost impossible for the receiver to guess where should be the image in the text.
accepting
Status: NEW → ASSIGNED
Keywords: dataloss
Target Milestone: --- → mozilla1.3beta
*** Bug 180994 has been marked as a duplicate of this bug. ***
By the definitions on <http://bugzilla.mozilla.org/bug_status.html#severity> and <http://bugzilla.mozilla.org/enter_bug.cgi?format=guided>, crashing and dataloss bugs are of critical or possibly higher severity. Only changing open bugs to minimize unnecessary spam. Keywords to trigger this would be crash, topcrash, topcrash+, zt4newcrash, dataloss.
Severity: normal → critical
One additional factor making this bug more severe is bug 187064, which can result in unexpected conversion to plain text.
*** Bug 137666 has been marked as a duplicate of this bug. ***
This bug also applies to local files which have been included in the message body (rather than as attachment), via drag-and-drop or Insert|Link. The file is not sent during the plain text conversion, but the href of the link is converted to a cid:-style URL text which fails since the file is not included. Such files should also be converted to attachments if the message is converted to plain text. Note that if a message with embedded images is sent as HTML and then *viewed* as plain text, those items *do* appear in the Attachments panel. This is not the case for an embedded file, altho the cid: link does work in that case. See also bug 2903.
Summary: message with embedded images lost the image when sent in plain text mode → message with embedded images or local files loses the image when sent in plain text mode
*** Bug 253057 has been marked as a duplicate of this bug. ***
*** Bug 258919 has been marked as a duplicate of this bug. ***
*** Bug 248760 has been marked as a duplicate of this bug. ***
Blocks: 2903
*** Bug 263463 has been marked as a duplicate of this bug. ***
*** Bug 225132 has been marked as a duplicate of this bug. ***
*** Bug 268278 has been marked as a duplicate of this bug. ***
*** Bug 268962 has been marked as a duplicate of this bug. ***
Product: MailNews → Core
*** Bug 246155 has been marked as a duplicate of this bug. ***
*** Bug 282993 has been marked as a duplicate of this bug. ***
(In reply to comment #0) > The proposed solution would be to > sent the embedded images as attachment, using the alternative text or the url of > the image as attachment name. Wouldn't a better solution in this case be to send the message as multipart/mixed and simply alternate plain/text parts with image/<x>, as they occurred in the compose window?
*** Bug 311197 has been marked as a duplicate of this bug. ***
There is a additional problem: 1. creating the mail in HTML 2. try to send a text only message ( maybe to view the text only result) 2. save as master (Vorlage in German) 3. open the master as new (als neu in German) (with images in HTML) 4. send it with the format option "assign automatically (autom. bestimmen in German) 5. sendmail The result is a plain text mail Version 1.5.0.9 (20061207) Windows XP professionel
Jean-Francois, I'm assuming you'll not be getting to this any time soon, so I'm putting it up for grabs.
Keywords: helpwanted
Target Milestone: mozilla1.3beta → ---
Assignee: ducarroz → nobody
Status: ASSIGNED → NEW
QA Contact: esther → composition
Product: Core → MailNews Core
Rephrasing summary for better search results
Summary: message with embedded images or local files loses the image when sent in plain text mode → Inline images or embedded local files silently stripped without trace when force-sending HTML message in plaintext mode (Options > Format > Plain Text only: img lost)
Summary: Inline images or embedded local files silently stripped without trace when force-sending HTML message in plaintext mode (Options > Format > Plain Text only: img lost) → Inline images or embedded local files silently stripped without trace when force-sending HTML message in plaintext mode (Options > Format > Plain Text only: img lost; need warning and/or conversion into attachments)
See Also: → 584363
Blocks: 470062
See Also: → 2903
Starting point in code: http://mxr.mozilla.org/comm-central/source/mailnews/compose/src/nsMsgCompose.cpp#4976 4976 // If we can guarantee that converting to plaintext is not lossy, send the 4977 // email as plaintext. Also send it if everyone prefers plaintext. 4978 if (aConvertible == nsIMsgCompConvertible::Plain || allPlain) 4979 { 4980 *result = nsIMsgCompSendFormat::PlainText; 4981 return NS_OK; 4982 } 4983 4984 // Otherwise, check the preference to see what action we should default to. 4985 nsCOMPtr<nsIPrefBranch> prefService(do_GetService(NS_PREFSERVICE_CONTRACTID, &rv)); 4986 NS_ENSURE_SUCCESS(rv, rv); 4987 4988 int32_t action = nsIMsgCompSendFormat::AskUser; 4989 rv = prefService->GetIntPref("mail.default_html_action", &action); 4990 NS_ENSURE_SUCCESS(rv, rv);
(In reply to Thomas D. (currently busy elsewhere; needinfo?me) from comment #23) > Rephrasing summary for better search results So, is the fix to this one to just LET PEOPLE KNOW it will strip out the image? If so, is there a patch for that? If not, Could someone please just WONTFIX this bug, and be done with it?
This still affects me badly and in the light of EFail I really hope this gets some momentum. I even have format to set to "Determine automatically" still images get stripped silently and I forget about it all the time, leaving my contact confused. The absolute minimum (even if set fixed to text only) should be a warning, that the images will get stripped. Other possible solutions: 1) The editor does not allow to add inline images in the first place (Text only mode) 2) The images get moved to attachments and replaces with text <image1.jpg> 3) The mail gets send as HTML if images are inlined (Determine automatically mode) 4) On send you get warned and can select between 2 or 3

Thomas, would that have been mitigated in bug 1222176? I came here from bug 1602445 comment #4.

Flags: needinfo?(bugzilla2007)

(In reply to Jorg K (GMT+1) (PTO to 5th Jan 2020, sporadically reading bugmail) from comment #28)

Thomas, would that have been mitigated in bug 1222176? I came here from bug 1602445 comment #4.

Probably yes, depending on scenarios / to some extent, but not completely. Bug 1222176 attempts to rectify/improve recipient-centric auto-detect format determination, so for mixed recipients preferences, and depending on settings, it may err in favor of HTML more often with default settings. Bug 1222176 also makes user's conflict resolution apply to allPlain recipient scope, so for conflict resolutions "send HTML" or "send BOTH", again cases which currently fail would be saved. However, even after bug 1222176, if you set your conflict resolution to "send PLAIN", silent dataloss would still occur after sending for any messages having at least one prefers-plain recpient. Same when you force your message directly to be sent in plain (options > delivery format > plain), this dataloss would always occur. That type of dataloss should NEVER occur, so this is a bug in its own right. Note that bug 1222176, iirc, was scaled down for compromise and acceptability to only have one combined preference for "allPlain" and "somePlain", but in theory, these recipient scopes may require different conflict resolutions. The whole behaviour would be far more controllable, predictable, and less buggy, less false promises with Bug 1222176; but ultimately, I'm still suspecting that the only cure for recipient-centric auto-detect, especially in the current shape of "trash message AFTER sending", is to rip it out and replace with an identity-centric solution. I could do that if I get paid.

Also note that the whole story involves those other bugs where we don't enforce, before sending, a WYSIWYG composition experience for the message format that will actually get sent, i.e. we don't do live conversions, and we don't have a switch for that (bugs on record). I think even the "real" plaintext editor still allows pasting images and HTML, worse when you compose HTML and just force plaintext for sending (read: after sending) - no immediate conversions, warnings, etc. It's a massive mess, so Bug 1222176 alone would NOT dry out the entire cesspool, but nevertheless improve things a lot.

Sorry, no short answers here - it's in the complexity of the matter.

Flags: needinfo?(bugzilla2007)

get automatically converted to plain text because the recipient is listed to accept only plain text.

Is this still a thing?

The recipient-based logic was removed in bug 1727493, so it's no longer a thing. However, the behaviour is still there:
Inline images or embedded local files silently stripped without trace when force-sending HTML message in plaintext mode.
"force-sending" these days means that the user asked for "plaintext only", either generally in the compose settings of via "Options > Sending Format".

(In reply to Francesco from comment #33)

The recipient-based logic was removed in bug 1727493, so it's no longer a thing. However, the behaviour is still there:
Inline images or embedded local files silently stripped without trace when force-sending HTML message in plaintext mode.
"force-sending" these days means that the user asked for "plaintext only", either generally in the compose settings of via "Options > Sending Format".

Sending html as forced plaintext can yield other stupid results as well that are worth investigating.

You need to log in before you can comment on or make changes to this bug.