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:

  1. 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): thunderbird profile dir
  2. Create the chrome directory if it does not exist.
  3. Create inside the chrome folder a file named userContent.css as a plain text file (be sure to show file extensions if necessary, otherwise you may end up with a userContent.css.txt file and it is not what we want)
  4. Edit the file with any text editor (notepad should work too), and put the following line in it:

    * { word-wrap: break-word; }
    
  5. Restart Thunderbird and you should be good to go.

This is a test I did locally, before and after applying the rule:

no rule

As you can see the text is not wrapped and there's the scrollbar you are talking about.

with the rule 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 :

image