MozillaZine

Plain text e-mail - Thunderbird

From MozillaZine Knowledge Base

(Difference between revisions)
Revision as of 02:07, 17 October 2006
Guanxi (Talk | contribs)
(To send all e-mails in plain text - clarify what forwarding msgs inline does.)
<-- Previous diff
Revision as of 02:48, 25 October 2006
Guanxi (Talk | contribs)
(format=flowed - add f=f reference link)
Next diff -->
Line 83: Line 83:
====format=flowed==== ====format=flowed====
-Mozilla uses format=flowed by default for plain text, as defined by RFC 2646. You can find details of Mozilla's implementation [https://bugzilla.mozilla.org/attachment.cgi?id=134270 here]. This [http://forums.mozillazine.org/viewtopic.php?p=2373497 forum post] describes compatibility problems between Thunderbird's format=flowed and other e-mail programs.+Mozilla uses format=flowed by default for plain text, as defined by RFC 2646. You can find details of Mozilla's implementation [https://bugzilla.mozilla.org/attachment.cgi?id=134270 here] and [http://www.bucksch.org/1/projects/mozilla/31906 here] (the latter may be somewhat out of date). This [http://forums.mozillazine.org/viewtopic.php?p=2373497 forum post] describes compatibility problems between Thunderbird's format=flowed and other e-mail programs.
To disable format=flowed, add these lines to "[[user.js]]": To disable format=flowed, add these lines to "[[user.js]]":

Revision as of 02:48, 25 October 2006

Contents

Background

Some people prefer to use plain text for e-mails. Plain text is essentially the letters, spaces, etc. with no formatting at all—for example there's no HTML, bold, italic, fonts, or other formatting, and minimal use of MIME.


The advantages are,

  • Plain text is understood by every e-mail program, so your recipients can almost certainly read it (though HTML and MIME are understood by most programs).
  • Plain text is much more secure: HTML can contain or enable viruses, spyware, or other undesirable things.
  • Plain text is understood by nearly every program and computer: if you want to search, modify, read, copy, etc. your e-mails using other programs or computers, it's easier.
  • Because plain text is simple and almost universally compatible, today's e-mails are more likely to be readable many years in the future, when other formats are obsolete.
  • Some people think the other formatting is extraneous decoration, and prefer the simplicity of plain text.


The disadvantages are,

  • You can't format your e-mails with fonts, bold, italic, or anything else.
  • Without using MIME when you forward e-mails, your recpients might encounter a few minor problems.
  • When forwarding e-mails, MIME better preserves the original format and data (including all headers).
  • Some people think plain text looks, well, plain.


To display plain text, including the quote bar (the blue bar on the left), wrapping long lines, etc., Thunderbird (and the Mozilla Suite) uses something called format=flowed. You can find a more detailed explanation here.

Sending plain text e-mails

To send one e-mail in plain text

If Thunderbird is configured to compose HTML e-mail, there are three ways to send a plain text e-mail:

  • If you do not utilize any HTML features (e.g., bold, font changes, etc), when you send the e-mail Thunderbird will convert it to a format that, in most important respects, is plain text.
  • Hold down the "Shift" key when you click the buttons for "Write", "Reply", or "Reply to All" (but not "Forward").
  • In the Compose window, where you are writing the e-mail, click Options -> Format -> Plain Text Only.

To send all e-mails in plain text

  1. Click "Tools -> Account Settings".
  2. Under the first account on the left, click "Composition & Addressing".
  3. Uncheck "Compose messages in HTML format" (at the top).
  4. Repeat the above 2 steps for each account displayed on the left, then click "OK".
  5. Click "Tools ->Options" and then, on the left, click "Composition".
  6. Change "Forward messages:" to "Inline" (at the top). (This setting causes some forwarded messages to appear at the bottom of the e-mail instead of in a MIME attachment; for more information, see the "advantages" & "disadvantages" sections above and the "Advanced" section below.)
  7. Uncheck "For messages that contain 8-bit characters..." (in the middle)

Once Thunderbird is configured for plain text, holding the "Shift" key when you click "Write", "Reply", or "Reply to All" buttons (but not "Forward") will send one e-mail in HTML format.

Reading e-mail in plain text

The following steps configure Thunderbird to display only the plain text in e-mails you receive, without formatting, fonts, bold, images, etc. The rest of the e-mail is still there, but Thunderbird won't display it until you undo these settings. You can still open attachments, including images, by right-clicking or double-clicking on them.

  1. Click "Tools -> Options -> Privacy -> General".
  2. Check the first box, "Block loading..." and uncheck the other two, "Allow remote images..." and "Enable JavaScript...".
  3. Still in the "Options" dialog, click "Display -> Formatting" and then uncheck "Display emoticons as graphics". Traditionally, plain text uses "Fixed width font", but it's not necessary.
  4. To block fonts: click "Fonts" tab and then the "Fonts..." button. Uncheck "Allow messages to use other fonts". Advanced users might want to disable "Character encodings".
  5. Click "OK" to close the "Options" dialog.
  6. Click "View" then "Message Body As" then "Plain Text". Thunderbird should now display a dot next to "Plain Text".
  7. Click "View" then "Display Attachments Inline". That option should now be unchecked (disabled).

You might find additional details regarding image-blocking here.

Advanced

Background

In this article, "plain text" means, technically, 7-bit ASCII.

Internet e-mail supports only 7-bit ASCII text, which means no formatting, no characters from most non-English alphabets, no binary attachments (e.g. images), etc.

To add that missing functionality, standards such as HTML, MIME, and base64 encoding have been developed. These standards are still in 7-bit ASCII, but they use codes to tell Thunderbird (and other e-mail programs) to convert portions of the e-mail from 7-bit ASCII into other things, such as bold text, images, etc. To see these codes, highlight an e-mail containing more than 7-bit ASCII (e.g. HTML, an image, an attached spreadsheet) and click "View -> Message Source". For more details, see the "MIME" section, below.

Those added features, though desireable, also add complexity and problems (see the Introduction section, above, for a discussion). The goal of this page is to show users how, as much as possible, they can minimize their e-mail to 7-bit ASCII. Thunderbird will not provide pure 7-bit ASCII.

Some technical details of HTML <-> text conversion and other text issues are here.

mbox format

Whether you use plain text or not, Thunderbird always stores mail in the mbox format, which is essentially 7-bit ASCII. You can find more information about mbox here.

You can always see an e-mail in its raw mbox format by highlighting the e-mail and clicking "View -> Message Source".

MIME and attachments

These links may help with understanding MIME and controlling how attachments are sent:

format=flowed

Mozilla uses format=flowed by default for plain text, as defined by RFC 2646. You can find details of Mozilla's implementation here and here (the latter may be somewhat out of date). This forum post describes compatibility problems between Thunderbird's format=flowed and other e-mail programs.

To disable format=flowed, add these lines to "user.js":

 pref("mailnews.send_plaintext_flowed", false); // RFC 2646
 pref("mailnews.display.disable_format_flowed_support", true);

More Options

Force HTML/Plain Text by domain

To control the format Thunderbird uses for a particular domain, click Tools -> Options -> Composition -> General-> Send Options.

Force us-ascii charset

If you would like Thunderbird to use "us-ascii" for the message's "charset" in the "content-type" header, add this line to "user.js":

 // If all of the characters in the message are 7bit,
 // use "us-ascii" for the character set.
 user_pref("mail.label_ascii_only_mail_as_us_ascii", true);

When you create a new e-mail account, you may need to repeat step 3 (Uncheck "Compose messages in HTML format") for the new account.

Color of quoted text in plain-text replies

To change the default display color for quoted text in plain-text replies, add the following to your userContent.css file:

/* Quoted text in plain-text replies */
span[_moz_quote=true] {color: green;}

Replace "green" with whatever color you want to use.