Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enabled HTML and Text sending #34

Closed
wants to merge 1 commit into from

Conversation

boredsquirrel
Copy link
Contributor

@boredsquirrel boredsquirrel commented Mar 16, 2023

This was really annoying. Sending images as attchments doesnt work as well in Flatpak Thunderbird, an there is little reason to not allow HTML at all.

Poorly there is no "send text, with HTML styles send text and HTML"

Description

Reason and / or context

How has this been tested ?

Types of changes :

  • Bug fix (non-breaking change which fixes an issue)
  • Typo / style fix (non-breaking change which improves readability)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist :

  • My changes looks good ;
  • I agree that my code may be modified in the future ;
  • My code follows the code style of this project (see .eslintrc.yml).

This was really annoying. Sending images as attchments doesnt work as well in Flatpak Thunderbird, an there is little reason to not allow HTML at all.

Poorly there is no "send text, with HTML styles send text and HTML"
@HorlogeSkynet
Copy link
Owner

Hi @trytomakeyouprivate, thanks for your PR.

My two cents below :

Sending images as attchments doesnt work as well in Flatpak Thunderbird

What is the issue about attachments and the Flatpak version of TB ? Is it specific to Flatpak ?

an there is little reason to not allow HTML at all.

That's true, and this is why this project is a template that has to be modified/overridden by the users, as needed.

Poorly there is no "send text, with HTML styles send text and HTML"

I couldn't get your sentence. What option you think is lacking from TB ?

Additionally : (very-opinionated point) the 3 value for mail.default_send_format causes the content of the email to be duplicated (one HTML version, one plain text version), which I think is clearly not a good idea from a sobriety point of view 🙃

Thanks, bye 👋

@boredsquirrel
Copy link
Contributor Author

boredsquirrel commented Mar 16, 2023

Images in attachments are random and cant be copy-pasted in the Flatpak.

Also they cant be resized.

There currently are the features:

  • send plain text
  • send html
  • send plain, when using styles send html
  • send html and text

What I am missing is

  • send plain, when using styles send html too

Of course sending both is f*ing weird, but so is replying to someone, sending what they sent back. Mail in general is extremely weird. What do you have old messages for if you could just check everything in the citations?

Sending plain text is good for the privacy people. But sanitized html is awesome too. What is not good is defaulting to always enforce plain, because it breaks messages and I didnt realize that until my contact was responding "there was no image"

@boredsquirrel
Copy link
Contributor Author

to this feature change also belong

user_pref("mail.inline_attachments", false);

user_pref("mail.html_compose", false);
user_pref("mail.identity.default.compose_html", false);
/* 9213: Send only plaintext email by default
 * [SETUP-FEATURE] Only use HTML email if you need it, see [1]
 * [SETTING] Composition > Composition > Sending Format
 * Email that is HTML should also have plaintext multipart for plain text users.
 * 0=auto (default, send only plain text if the message is free of any rich formatting
   or inserted elements. Otherwise send both a HTML part and plain text alternative part)
 * 1=plain text (only send a plain text part, losing any rich formatting or inserted elements)
 * 2=HTML (only send a HTML part)
 * 3=both (send both the HTML part and the plain text alternative part)
 * [1] https://drewdevault.com/2016/04/11/Please-use-text-plain-for-emails.html ***/
user_pref("mail.default_send_format", 1);

@boredsquirrel
Copy link
Contributor Author

line 1442-1454

@boredsquirrel
Copy link
Contributor Author

I would use a sed script and allow the user to replace these settings by themselves.

@HorlogeSkynet
Copy link
Owner

Images in attachments are random and cant be copy-pasted in the Flatpak.

Also they cant be resized.

Yes, when sending as plain text, you "lost" all dynamic features offered by HTML. Images are treated as "regular" attachment files (which is usually not an issue in most cases).

What I am missing it

* send plain, when using styles send html too

Ah, thanks. Indeed, this mode does not exist (yet ?). You can search and/or file an issue upstream.

Of course sending both is f*ing weird, but so is replying to someone, sending what they sent back. Mail in general is extremely weird. What do you have old messages for if you could just check everything in the citations?

Yes. I guess the whole thing we are experiencing about emails comes from the extent of MTA and MUA implementations currently being used all over the world. Fortunately for us, TB is pretty customizable.

Sending plain text is good for the privacy people. But sanitized html is awesome too. What is not good is defaulting to always enforce plain, because it breaks messages and I didnt realize that until my contact was responding "there was no image"

Good for privacy, and good for the environment too (isn't it always the case though ?) 🙃
If the bug you are experiencing is specific to Flatpak, I invite you to file an issue upstream too !
What I cannot understand is : Did you actually attach an image that never got sent ? Or you thought you'd attached an image that actually wasn't ?
(For what it's worth, I don't think it breaks messages to write/send it as plain text ; The format is simply different)


I'd rather invite you to write your own override (like this one that you can then "append" to this template.
This way you can "update" the template to newer versions without sed-ing preference values or manually modifying it.

One last thing : you can "temporary" write/send HTML emails by pressing SHIFT when you click on the Write or Reply buttons.
Regular emails will get sent as plain text, and when you need to attach images, the HTML editor will be right here.

Cheers 👋

@boredsquirrel
Copy link
Contributor Author

Interesting, if Images are handled like that its no problem. Still I think users should be able to send beautiful looking messages, its important to make Thunderbird not look like a stone age program or even broken, and there is no security issue.

Interesting, yes forking it or making a custom version for sure is an option, even though I think HTML out should not be included.

I dont know what these overrides are, is that a Github thing? I would just create my own version for now, and do a little sed script for the 4 affected settings.

@HorlogeSkynet
Copy link
Owner

Still I think users should be able to send beautiful looking messages, its important to make Thunderbird not look like a stone age program or even broken, and there is no security issue.

I agree, they should be able to do so 😇

I dont know what these overrides are, is that a Github thing? I would just create my own version for now, and do a little sed script for the 4 affected settings.

The concept comes from (upstream) Arkenfox' user.js (you can check this wiki page). The project comes with a bunch of "scripts" that ease the application of user's overrides (as long as the resetting of deprecated/reset preferences). These scripts have not (yet) been adapted here, but one can simply edit them to manage overrides for TB instead of FF.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

2 participants