Can Thunderbird wrap long lines of received html mails?
I often get e-mails (*1) in HTML format where the lines are longer than the window width of Thunderbird and often even longer than my screen width. In order to read theses messages I have to scroll horizontally all the time.
One Option to make messages readable is to switch View/Message Body to plain text, but that also loses all the formatting. Switching to simple HTML does not help.
Is there any way for me (as the receiver) to force Thunderbird to wrap long lines so that these messages become readable?
I of course googled but found nothing but hints that only worked in the compose window or to tell the senders to stop using broken software. All that is not really helpful.
(*1: from brain dead correspondents using broken mail clients, I know, but there is nothing I can do about this.)
Solution 1:
Luckily Thunderbird is a really expandable client, so a possible solution would be to edit the userContent.css
file which allows you to specify custom CSS rules for messages.
Try the following steps:
- Go to your Thunderbird profile folder (follow the instructions in the page and select your OS). It should look like this (obviously with a bunch of other files):
- Create the
chrome
directory if it does not exist. - Create inside the
chrome
folder a file nameduserContent.css
as a plain text file (be sure to show file extensions if necessary, otherwise you may end up with auserContent.css.txt
file and it is not what we want) -
Edit the file with any text editor (notepad should work too), and put the following line in it:
* { word-wrap: break-word; }
- Restart Thunderbird and you should be good to go.
This is a test I did locally, before and after applying the rule:
As you can see the text is not wrapped and there's the scrollbar you are talking about.
Now, with the userContent.css
applied, the text is wrapped automatically (thus there are no scrollbars) and this looks like it's what you wanted.
Solution 2:
Complementing Robertof's answer, I used the following userContent.css
:
/* Avoid annoyingly long lines */
body {
max-width: 50em;
}
pre {
max-width: 50em;
white-space: pre-wrap; /* CSS 3 */
}
Using this approach, I feel in perfect control of how messages should be displayed to me.
Place userContent.css
into the following folder (creating if necessary):
C:\Users\[username]\AppData\Roaming\Thunderbird\Profiles\[profile name].default\chrome\
Solution 3:
While viewing the message use
the menu option of View / Word wrap within <PRE>
, or press Ctrl + Shift + Q :