eyalroz / bidimailui

BiDi Mail UI: Thunderbird extension for improved right-to-left language support
https://addons.thunderbird.net/en-US/thunderbird/addon/bidi-mail-ui/
Other
19 stars 2 forks source link

Extension forces HTML delivery format #55

Open living180 opened 2 years ago

living180 commented 2 years ago

I intentionally use auto-detect as my delivery format to send messages as plain text when possible (Options > Delivery Format > Auto-Detect from a compose window). However, after BiDi Mail UI is enabled, the delivery format gets forced to HTML, which causes problems for me when sending to mailing lists which refuse HTML messages. I can still manually select Plain Text Only, but I have to remember to do this for every message.

Is it technically possible to implement this extension without forcing HTML format?

eyalroz commented 2 years ago

Ok, so, here's the deal...

First of all - the delivery format does not get forced into HTML :-\ . If you write a plain text message, it gets sent as plain text.

If you write an HTML message, BiDi Mail UI does three things:

Two or three of these preclude the message from being sent in plain-text format.

However, what you could do is set the extensions.bidiui.mail.compose.default_to_send_text_with_html preference to true, using the config editor. This means your message will be sent in plain text as well as HTML, so the recipient can choose to view it as they like (e.g. configure their mail client to prefer plain text). Is that satisfactory?

living180 commented 2 years ago

I think perhaps I was not as clear as I could have been in my original comment. Let me try to explain again: if I do not have BiDi Mail UI enabled, when I compose a new message, the Options > Delivery Format menu item is set to "Auto-Detect", meaning that if I do not use any text styling in the message, it will be sent as plain text (and HTML otherwise). However, if I enable BiDi Mail UI, when I compose a new message, the Options > Delivery Format menu item is set to "Rich Text (HTML) Only", which means that unless I manually change the delivery format, the email will be sent as HTML even if I don't add any text styling, which is not what I want. If I manually change the delivery format to "Plain Text Only", then the message will in fact be sent as plain text, but I have to remember to do that for each email. Perhaps this is the expected behavior. If so, it is not a showstopper for me, as I can leave the extension disabled most of the time and only enable it when I need to work with RTL text.

However, what you could do is set the extensions.bidiui.mail.compose.default_to_send_text_with_html preference to true, using the config editor. This means your message will be sent in plain text as well as HTML, so the recipient can choose to view it as they like (e.g. configure their mail client to prefer plain text). Is that satisfactory?

Unfortunately, that doesn't work for my case, as I sometimes need to send mail to mailing lists which reject any email with HTML content, regardless of whether or not there is also text content.

Anyway, thanks for the extension. It has definitely proven useful to me, and I'm sure I'll continue using it regardless of how this issue gets resolved.

eyalroz commented 2 years ago

I think perhaps I was not as clear as I could have been in my original comment.

You were quite clear actually... the only information I was missing is that sentence about the mailing list. Ideally, the list should accept a Text + HTML message and simply only send the text part of it. Unfortunately that's not something you can arrange. Also unfortunately, it's not something I can reasonably fix, either, because there aren't decent hooks - that I know of - for finalizing message content and parameters just before sending it out; and like I said, I can't rely on what TB does automatically.

Unfortunately, that doesn't work for my case, as I sometimes need to send mail to mailing lists which reject any email with HTML content, regardless of whether or not there is also text content.

Something else you could try is creating an address book entry for the mailing list address, then in the address book, mark it as preferring text-only messages. edit: Looks like that doesn't help much either. I guess you would need a toolbar button for forcing sending text-only.