Plain text e-mail - Thunderbird: Difference between revisions

From MozillaZine Knowledge Base
Jump to navigationJump to search
(Removed "Request for comments" category and added Request for comments template (which displays some text and adds it to the same category))
(first pass at simplfying article and removing 7-bit ascii definition of plain text)
Line 1: Line 1:
{{Request for comments}}
You can create messages using either plain text or [[HTML]]. At one time plain text messages were limited to 7-bit ASCII messages with plain text attachments but nowadays almost all email clients support [http://en.wikipedia.org/wiki/MIME MIME] (for interoperability with Microsoft email clients etc.) so you can use other character sets, binary attachments and multi-part message bodies. HTML adds the ability to use additional formatting such as bold, italics, different fonts, tables and embedded images.  
==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.


In most cases its just a question of personal preference which format you use. However, some people strongly prefer to receive plain text messages. [http://email.about.com/cs/netiquettetips/qt/et070103.htm If you are uncertain whether a HTML message would be acceptable] send a plain text message. 


The advantages are,
One problem is that Thunderbird's behavior when replying to a message depends upon what version you use. For example, when you reply to a message it may switch to whatever format is specified by "prefers to receive messages formatted as" in the recipients entry in address book unless you set some other preferences.
* 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.


==Send plain text messages==


The disadvantages are,
* Uncheck [[Menu differences in Windows, Linux, and Mac|Tools -> Account Settings]] -> Composition & Addressing -> Compose messages in HTML format for each account.
* You can't format your e-mails with fonts, bold, italic, or anything else.
* If it sometimes wants to reply in HTML add *.* as the domain name in Tools -> Options -> Composition -> Send Options -> Plain Text Domains if you want to force it to always send using plain text.
* 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.


==Send HTML messages==
* Check [[Menu differences in Windows, Linux, and Mac|Tools -> Account Settings]] -> Composition & Addressing -> Compose messages in HTML format for each account if it isn't already checked.
* If it sometimes wants to reply in plain text you can
**Select "Send the message in both plain text and HTML" in Tools -> Options -> Composition -> Send Options -> Text Format to have it send a single copy of the message that can be displayed as either HTML or plain text depending upon the recipients preference or
** Add *.* as the domain name in Tools -> Options -> Composition -> Send Options -> HTML Domains if you want to force it to always send HTML messages.


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 [http://www.joeclark.org/ffaq.html here].
The Send Options -> Text Format list box has several other choices if this doesn't do what you want.  


==Sending plain text e-mails==
==Temporarily bypass the settings==
You don't need to re-configure Thunderbird if you want to send the occasional message in the other format. Just press the "Shift" key when clicking the "Write", "Reply", or "Reply to All" button and it will use the other format for that message. Unfortunately, this doesn't work for "Forward".


===To send one e-mail in plain text===
==Displaying messages==
If Thunderbird is configured to compose HTML e-mail, there are three ways to send a plain text e-mail:
''View -> Message Body As'' defaults to ''Original HTML''. This will display a HTML or a plain text message as is. If you set it to ''Plain Text'' it will display a plain text message as is, and transparently convert a HTML message to a plain text message. This doesn't just interpret it as plain text, it temporarily gets rid of all of the HTML tags in the message source so that you don't see what looks like code. The third option ''Simple HTML'' isn't used as much. Its similar to the ''Original HTML'' setting but will only interpret basic HTML commands, disables Javascript, and doesn't display remote images.


* 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.
Its recommended that you uncheck ''View -> Display Attachments Inline''. Checking it lets you view embedded images inline, rather than as attachments. However, its a security risk since you've lost the ability to avoid opening a malicious attachment.
* Hold down the "Shift" key when you click the buttons for "Write", "Reply", "Reply to All" or "Forward" ("Forward" won't work if Thunderbird is configured to forward messages ''Inline''. To find that setting see ''To send all e-mails in plain text'', below).
* 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===
Thunderbird defaults to using a quote bar (a blue bar on the left) rather than a '>' for quoted text. This uses a standard called [http://www.joeclark.org/ffaq.html format=flowed'].


# Click "[[Menu differences in Windows, Linux, and Mac|Tools -> Account Settings]]".
==See also==
# Under the first account on the left, click "Composition & Addressing".
*[[Creating complex mails with inline images]]
# Uncheck "Compose messages in HTML format" (at the top).
*[[Default HTML font for new messages - Thunderbird]]
# Repeat the above 2 steps for each account displayed on the left, then click "OK".
*[[Forwarded messages not readable]]
# Click "[[Menu differences in Windows, Linux, and Mac|Tools ->Options]]" and then, on the left, click "Composition".
*[[Mail content types]] has more detailed information on the types of e-mail messages.
# 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.)
# 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.
 
# Click "[[Menu differences in Windows, Linux, and Mac|Tools -> Options]] -> Privacy -> General".
# Check the first box, "Block loading..." and the third box "Block JavaScript..."  Uncheck the second, "Allow remote images...".
# 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.
# 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".
# Click "OK" to close the "Options" dialog.
# Click "View" then "Message Body As" then "Plain Text". Thunderbird should now display a dot next to "Plain Text".
# Click "View" then "Display Attachments Inline". That option should now be unchecked (disabled).
 
You might find additional details regarding image-blocking [[Images in messages do not appear | here]].
 
==Advanced==
 
===Background===
In this article, "plain text" means, technically, 7-bit [http://en.wikipedia.org/wiki/ASCII 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 [http://www.bucksch.org/1/projects/mozilla/ 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 [[Importing and exporting your mail#mbox: Understanding Mozilla's format|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:
*[[Saving and detaching attachments]]
*[[Saving and detaching attachments]]
*[[Forwarded messages not readable]]
*[[Send plain text attachments as real attachments]]
*[[Send plain text attachments as real attachments]]
*[http://en.wikipedia.org/wiki/MIME MIME] in Wikipedia.
*[[Quote bars]]
* Some details on the settings involved in sending attachments inline or via MIME are [http://forums.mozillazine.org/viewtopic.php?t=213736 here]
 
====format=flowed====
By default Mozilla uses format=flowed, which is defined by RFC 3676, for plain text. 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]]":
  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.


==External links==
* [http://www.bucksch.org/1/projects/mozilla/ Technical details on how View -> Message Body As works].


[[Category:Composing messages (Thunderbird)]]
[[Category:Composing messages (Thunderbird)]]
[[Category:Displaying and printing messages (Thunderbird)]]
[[Category:Displaying and printing messages (Thunderbird)]]

Revision as of 11:39, 14 March 2008

You can create messages using either plain text or HTML. At one time plain text messages were limited to 7-bit ASCII messages with plain text attachments but nowadays almost all email clients support MIME (for interoperability with Microsoft email clients etc.) so you can use other character sets, binary attachments and multi-part message bodies. HTML adds the ability to use additional formatting such as bold, italics, different fonts, tables and embedded images.

In most cases its just a question of personal preference which format you use. However, some people strongly prefer to receive plain text messages. If you are uncertain whether a HTML message would be acceptable send a plain text message.

One problem is that Thunderbird's behavior when replying to a message depends upon what version you use. For example, when you reply to a message it may switch to whatever format is specified by "prefers to receive messages formatted as" in the recipients entry in address book unless you set some other preferences.

Send plain text messages

  • Uncheck Tools -> Account Settings -> Composition & Addressing -> Compose messages in HTML format for each account.
  • If it sometimes wants to reply in HTML add *.* as the domain name in Tools -> Options -> Composition -> Send Options -> Plain Text Domains if you want to force it to always send using plain text.

Send HTML messages

  • Check Tools -> Account Settings -> Composition & Addressing -> Compose messages in HTML format for each account if it isn't already checked.
  • If it sometimes wants to reply in plain text you can
    • Select "Send the message in both plain text and HTML" in Tools -> Options -> Composition -> Send Options -> Text Format to have it send a single copy of the message that can be displayed as either HTML or plain text depending upon the recipients preference or
    • Add *.* as the domain name in Tools -> Options -> Composition -> Send Options -> HTML Domains if you want to force it to always send HTML messages.

The Send Options -> Text Format list box has several other choices if this doesn't do what you want.

Temporarily bypass the settings

You don't need to re-configure Thunderbird if you want to send the occasional message in the other format. Just press the "Shift" key when clicking the "Write", "Reply", or "Reply to All" button and it will use the other format for that message. Unfortunately, this doesn't work for "Forward".

Displaying messages

View -> Message Body As defaults to Original HTML. This will display a HTML or a plain text message as is. If you set it to Plain Text it will display a plain text message as is, and transparently convert a HTML message to a plain text message. This doesn't just interpret it as plain text, it temporarily gets rid of all of the HTML tags in the message source so that you don't see what looks like code. The third option Simple HTML isn't used as much. Its similar to the Original HTML setting but will only interpret basic HTML commands, disables Javascript, and doesn't display remote images.

Its recommended that you uncheck View -> Display Attachments Inline. Checking it lets you view embedded images inline, rather than as attachments. However, its a security risk since you've lost the ability to avoid opening a malicious attachment.

Thunderbird defaults to using a quote bar (a blue bar on the left) rather than a '>' for quoted text. This uses a standard called format=flowed'.

See also

External links