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

Extension forces HTML delivery format #55

Open
living180 opened this issue May 2, 2022 · 3 comments
Open

Extension forces HTML delivery format #55

living180 opened this issue May 2, 2022 · 3 comments

Comments

@living180
Copy link

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
Copy link
Owner

eyalroz commented May 2, 2022

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:

  • Put you in paragraph mode.
  • Set paragraph margins (i.e. introduce a style element)
  • Set the body's direction to whatever basic direction the message is supposed to have

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
Copy link
Author

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
Copy link
Owner

eyalroz commented May 12, 2022

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.

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

No branches or pull requests

2 participants