After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 794569 - Add option to send HTML mail along with plain text
Add option to send HTML mail along with plain text
Status: RESOLVED NOTABUG
Product: evolution
Classification: Applications
Component: Composer
3.28.x
Other Linux
: Normal enhancement
: ---
Assigned To: evolution-mail-maintainers
Evolution QA team
Depends on:
Blocks:
 
 
Reported: 2018-03-21 15:33 UTC by woky
Modified: 2018-03-22 08:13 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description woky 2018-03-21 15:33:38 UTC
Currently, it's possible to compose mail in HTML and send plain text copy as well. It'd be be able to compose plain text and send HTML copy as well, especially for mobile recipients whose display screen width is limited. Such clients cannot reflow plain text paragraphs but can reflow HTML paragraphs.
Comment 1 Milan Crha 2018-03-21 17:43:29 UTC
Thanks for a bug report. How exactly do you expect this to work, please?

When using Plain Text mode, the resulting message has text/plain part and that's all (assumed no digital signing, encryption or attachments had been added).

When using HTML mode, the resulting message structure looks like this:

    multipart/alternative
       text/plain
       text/html

With your option, I guess it would be something like:

    multipart/mixed
       text/plain
       text/html

but it's wrong, because it means the second part is like an attachment and I doubt any client would prefer showing random HTML attachment instead of actual message body (there are more down sides of the multipart/mixed).

I'm afraid your option is to compose in HTML, if you really want to support anything like this for your recipients. A much better option would be to fix the mobile mail clients, of course.
Comment 2 woky 2018-03-21 19:37:36 UTC
I'd like to compose mail in plain plain text editor but send the message with the structure as if it has been composed in HTML mail. That is:

    multipart/alternative
       text/plain
       text/html

Unfortunately, mobile clients can't be fixed to display text/plain properly on narrow screens, because Evolution paragraphs contains physical line breaks and AFAIU client can't just join their lines to reflow them.

So for example this is the plain text email I write in Evolution with wrap margin 60 (just an example):

Lorem Ipsum is simply dummy text of the printing and
typesetting industry. Lorem Ipsum has been the industry's
standard dummy text ever since the 1500s, when an unknown
printer took a galley of type and scrambled it to make a
type specimen book. 

And this is what's rendered on mobile client with narrow screen (also depends on font size):

Lorem Ipsum is simply dummy text of
the printing and
typesetting industry. Lorem Ipsum has
been the industry's
standard dummy text ever since the
1500s, when an unknown
printer took a galley of type and
scrambled it to make a
type specimen book. 

Solutions:
1) Use format=flowed. That's not supported in Evolution and most of the mobile clients I've tried don't support it either.
2) Add option to Format menu to break paragraphs only visually.
3) Send HTML part along with plain text part.

ad 2) I was trying to set maximum wrap margin to maximum integer value and the text in the composer overflowed over the edge (horizontal scrollbar appeared).

ad 3) Mobile clients like Gmail, K-9 Mail and ProtonMail automatically picks the text/html part. I was digging in the sources a bit and noticed that the composer holds the message in WebKit DOM tree regardless of the mode (plain text or HTML), so I assumed it'd be easy, but the code base is too large and I'm still too confused.
Comment 3 woky 2018-03-21 22:20:08 UTC
I'd just like to add that option 3) is probably best, because on PC, writing plain text in paragraphs is still more comfortable than writing wide HTML formatted text, it respects etiquette of mailing lists and at the same time allows mobile clients to view properly formatted normal paragraphs. And if it's hidden behind global/account/message option, it won't hurt anyone.
Comment 4 Milan Crha 2018-03-22 08:13:03 UTC
(In reply to woky from comment #2)
> Solutions:
> 1) Use format=flowed. That's not supported in Evolution and most of the
> mobile clients I've tried don't support it either.

I think there's a bug for it, but as it requires some cooperation on the client side I'd not do it.

> 2) Add option to Format menu to break paragraphs only visually.

You can use the Preformatted format, in combination with bug #790632.

(In reply to woky from comment #3)
> I'd just like to add that option 3) is probably best, ... it respects
> etiquette of mailing lists ...

No, it doesn't respect it. When you create a message like this:

(In reply to woky from comment #2)
> I'd like to compose mail in plain plain text editor but send the message
> with the structure as if it has been composed in HTML mail. That is:
> 
>     multipart/alternative
>        text/plain
>        text/html

then it means it's an HTML message. It's not a plain text message by any means. The multipart/alternative means: "client, I present you the text, which you can show in any of these formats, just pick the best you can work with". It's up to the client to pick which works the best for it (+/- options like Prefer Plain), while the sender is supposed to ensure that all the parts present exactly the same information.

To summarize: the option you are looking for is called "Format messages in HTML", no need to duplicate it and/or cause confusion to the users while they would believe they send messages in Plain text, but they'd send HTML messages instead. That would be evil from the Evolution side. If you do not want Evolution to wrap paragraphs in the Plain text mode, then use Preformatted format. Then you might need also bug #790632, because otherwise the writing with horizontal scrollbar is pretty bad, as you already noticed.