Plain text e-mail - Thunderbird: Difference between revisions

From MozillaZine Knowledge Base
Jump to navigationJump to search
(→‎Advanced: divide Advanced section into Background and More Options subsections)
 
(34 intermediate revisions by 10 users not shown)
Line 1: Line 1:
==Background==
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.  
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 it's 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 to which you always want to send plain text messages.
* 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 [[Menu differences in Windows, Linux, and Mac|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.
* For submitting patches or other cases where you need the body of the email to remain completely unchanged, see [[#Completely_plain_email|Completely plain email]].
* 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 [[Menu differences in Windows, Linux, and Mac|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 [[Menu differences in Windows, Linux, and Mac|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].
==Send both plain text and HTML==
If you prefer to send HTML messages but don't know what your recipients prefer or what their email client supports its possible to create a message in HTML and have Thunderbird send the message with both a HTML and a plain text version of the message body. It has a Content-Type: multipart/alternative; header so which message body is displayed depends upon the recipients email clients settings. Thunderbird automatically creates a plain text version for you by stripping the HTML tags from a copy of the HTML message body.


==Sending plain text e-mails==
You can configure Thunderbird to do this by setting [[Menu differences in Windows, Linux, and Mac|Tools -> Options]]-> Composition -> General -> Send Options -> Text Format -> Send the message in both plain text and HTML.


===To send one e-mail in plain text===
==Change your mind==
If Thunderbird is configured to compose HTML e-mail, there are three ways to send a plain text e-mail:
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".


* 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.
You normally can't change what type of message it is when editing a draft or composing a message. The only exception is that you can use Options -> Format in a HTML message to change the type of message.
* 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===
==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 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.


# Click "[[Menu differences in Windows, Linux, and Mac|Tools -> Account Settings]]".
If you prefer to display messages as plain text but occasionally need to view some as HTML the [https://addons.mozilla.org/en-US/thunderbird/addon/1556 Allow HTML Temp] extension lets you add a "Show HTML" button to the toolbar that will display the selected message as ''Original HTML'', and then revert to the ''View -> Message Body As'' setting when you select the next message. You can add it to the toolbar by right clicking on it, selecting Customize, and then dragging the button to it.  
# Under the first account on the left, click "Composition & Addressing".
# Uncheck "Compose messages in HTML format" (at the top).
# Repeat the above 2 steps for each account displayed on the left, then click "OK".
# Click "[[Menu differences in Windows, Linux, and Mac|Tools ->Options]]" and then, on the left, click "Composition".  
# Change "Forward messages:" to "Inline" (at the top).  (This setting converts some forwarded e-mails to plain text and disables MIME; 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.
Its recommended that you don't check ''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.


==Reading e-mail in plain text==
Thunderbird defaults to using a [[Quote bars|quote bar]] (a blue bar on the left) rather than a '>' for quoted 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.  
==Advanced==
===Flowed format===
By default, support for [http://www.joeclark.org/ffaq.html flowed] plain-text format is enabled. Incoming messages with the "format=flowed" attribute set are rewrapped to utilize the full width of the message window. Outgoing messages are still wrapped regularly, but the receiving e-mail client is allowed to rewrap the message for display. There are separate preferences to disable [[Mail_content_types#Plain_text | flowed message display]] ('''mailnews.display.disable_format_flowed_support''') and [[Mail_content_types#Disabling_paragraph_flow | sending flowed e-mails]] ('''mailnews.send_plaintext_flowed'''). You can use '''mailnews.wraplength''' to change the line length for messages you compose (defaults to 72 characters), '''mail.compose.wrap_to_window_width''' to wrap to the window width when composing a message (defaults to false) and '''mail.wrap_long_lines''' to control the wrapping of long lines (defaults to true).


# Click "[[Menu differences in Windows, Linux, and Mac|Tools -> Options]] -> Privacy -> General".
Most webmail implementations, Outlook, Evolution, and Mac OS X Mail don't support it. Thunderbird, SeaMonkey, PostBox, Eudora, Pine, M2 (Opera mail program) and LuxSci webmail do. It is a interesting standard that just didn't catch on.
# Check the first box, "Block loading..." and uncheck the other two, "Allow remote images..." and "Enable JavaScript...".
# 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]].
When replying in plain text, quotes may appear as a single line per paragraph (see this [http://forums.mozillazine.org/viewtopic.php?t=620097#3219442 forum thread]). Use ''Edit -> Rewrap'' to restore wrapping for those quotes.


==Advanced==
Flowed text can cause problems with OpenPGP signatures. [http://www.mozilla-enigmail.org/forum/viewtopic.php?t=12] [http://enigmail.mozdev.org/support/troubles.php.html#flowed] . The [http://enigmail.mozdev.org/home/index.php.html Enigmail add-on] automatically replaces ">" in quoted messages with "|" and leading spaces with "~" to workaround this unless you set '''mailnews.send_plaintext_flowed false'''. There are also potential problems sending and saving patches [http://db.apache.org/derby/derby_comm.html] [http://mozilla-xp.com/mozilla.support.thunderbird/extra-sig-deliminter-when-pgp-signing-posts,3] if you use Enigmail. If you do not use "gpg --clearsign --not-dash-escaped ..." to disable dash-escaping all lines beginning with a dash are prefixed by a dash and a space. This is the reason you might notice an extra space and dash on any signature. [http://www.opensubscriber.com/message/enigmail@mozdev.org/13701577.html].


===Background===
Flowed text doesn't apparently cause problems with [http://kb.mozillazine.org/Message_security S/MIME] (the built-in support for digital signatures and encrypted messages in Thunderbird).
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. 
===Structured Text===


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.
Thunderbird will display text in a plain text message in bold if its surrounded by '*', in italics if its surrounded by '/' and underline it if its surrounded by '_'. For example,  


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.  
This is *bold text*. This is /italic/. This is _underlined_ text
would be displayed as This is '''bold text''' . This is ''italic''. This is <u>underlined</u> text


Some technical details of HTML <-> text conversion and other text issues are [http://www.bucksch.org/1/projects/mozilla/ here].
This occurs due to '''mail.display_struct''' defaulting to '''true'''. You can disable this feature by setting it to false. Only Mozilla applications interpret the tags this way so it has limited usefulness.  


====mbox format====
===Completely plain email===
By default, Thunderbird will wrap plain text emails as well as send them in [[#Flowed format|flowed format]].  This creates an experience that is better for most senders and receivers of email.  However, there are certain cases where having an unaltered email is preferred, such as submitting a patch to an open source project.  In that case, you will want to use plain text format, set wrap to zero in [[Options (Preferences)]] - Composition - General, and [[Mail_content_types#Disabling_paragraph_flow | disable flowed e-mails]].


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]].
==See also==
 
*[[Creating complex mails with inline images]]
You can always see an e-mail in its raw mbox format by highlighting the e-mail and clicking "View -> Message Source".
*[[Default HTML font for new messages - Thunderbird]]
 
*[[Forwarded messages not readable]]
====MIME and attachments====
*[[Mail content types]] has more detailed information on the types of e-mail messages.
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====
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.
 
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===
 
====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==
* [https://cpbotha.net/2016/09/27/thunderbird-support-of-rfc-3676-formatflowed-is-half-broken/ ThunderBird support of RFC 3676 format=flowed is half-broken]
* [http://www.bucksch.org/1/projects/mozilla/ Technical details on how View -> Message Body As works].
* [https://nic-nac-project.org/~kaosmos/changequote-en.html Change quote and reply format] extension lets you reply in the same format (plain text or HTML) as the message, regardless of the accounts settings.
* [http://edmullen.info/mozilla/moz_stext.php Structured text]
* Bug report about [https://bugzilla.mozilla.org/show_bug.cgi?id=26734 format=flowed message generation must follow CJK line-breaking conventions]
* MozillaZine thread about [http://forums.mozillazine.org/viewtopic.php?f=28&t=568129 Cursor stops moving on space bars]
[[Category:Composing messages (Thunderbird)]]
[[Category:Composing messages (Thunderbird)]]
[[Category:Displaying and printing messages (Thunderbird)]]
[[Category:Displaying and printing messages (Thunderbird)]]

Latest revision as of 00:19, 20 December 2016

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 it's 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 to which you always want to send plain text messages.
  • 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.
  • For submitting patches or other cases where you need the body of the email to remain completely unchanged, see Completely plain email.

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.

Send both plain text and HTML

If you prefer to send HTML messages but don't know what your recipients prefer or what their email client supports its possible to create a message in HTML and have Thunderbird send the message with both a HTML and a plain text version of the message body. It has a Content-Type: multipart/alternative; header so which message body is displayed depends upon the recipients email clients settings. Thunderbird automatically creates a plain text version for you by stripping the HTML tags from a copy of the HTML message body.

You can configure Thunderbird to do this by setting Tools -> Options-> Composition -> General -> Send Options -> Text Format -> Send the message in both plain text and HTML.

Change your mind

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".

You normally can't change what type of message it is when editing a draft or composing a message. The only exception is that you can use Options -> Format in a HTML message to change the type of message.

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 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 prefer to display messages as plain text but occasionally need to view some as HTML the Allow HTML Temp extension lets you add a "Show HTML" button to the toolbar that will display the selected message as Original HTML, and then revert to the View -> Message Body As setting when you select the next message. You can add it to the toolbar by right clicking on it, selecting Customize, and then dragging the button to it.

Its recommended that you don't check 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.

Advanced

Flowed format

By default, support for flowed plain-text format is enabled. Incoming messages with the "format=flowed" attribute set are rewrapped to utilize the full width of the message window. Outgoing messages are still wrapped regularly, but the receiving e-mail client is allowed to rewrap the message for display. There are separate preferences to disable flowed message display (mailnews.display.disable_format_flowed_support) and sending flowed e-mails (mailnews.send_plaintext_flowed). You can use mailnews.wraplength to change the line length for messages you compose (defaults to 72 characters), mail.compose.wrap_to_window_width to wrap to the window width when composing a message (defaults to false) and mail.wrap_long_lines to control the wrapping of long lines (defaults to true).

Most webmail implementations, Outlook, Evolution, and Mac OS X Mail don't support it. Thunderbird, SeaMonkey, PostBox, Eudora, Pine, M2 (Opera mail program) and LuxSci webmail do. It is a interesting standard that just didn't catch on.

When replying in plain text, quotes may appear as a single line per paragraph (see this forum thread). Use Edit -> Rewrap to restore wrapping for those quotes.

Flowed text can cause problems with OpenPGP signatures. [1] [2] . The Enigmail add-on automatically replaces ">" in quoted messages with "|" and leading spaces with "~" to workaround this unless you set mailnews.send_plaintext_flowed false. There are also potential problems sending and saving patches [3] [4] if you use Enigmail. If you do not use "gpg --clearsign --not-dash-escaped ..." to disable dash-escaping all lines beginning with a dash are prefixed by a dash and a space. This is the reason you might notice an extra space and dash on any signature. [5].

Flowed text doesn't apparently cause problems with S/MIME (the built-in support for digital signatures and encrypted messages in Thunderbird).

Structured Text

Thunderbird will display text in a plain text message in bold if its surrounded by '*', in italics if its surrounded by '/' and underline it if its surrounded by '_'. For example,

This is *bold text*. This is /italic/. This is _underlined_ text 

would be displayed as This is bold text . This is italic. This is underlined text

This occurs due to mail.display_struct defaulting to true. You can disable this feature by setting it to false. Only Mozilla applications interpret the tags this way so it has limited usefulness.

Completely plain email

By default, Thunderbird will wrap plain text emails as well as send them in flowed format. This creates an experience that is better for most senders and receivers of email. However, there are certain cases where having an unaltered email is preferred, such as submitting a patch to an open source project. In that case, you will want to use plain text format, set wrap to zero in Options (Preferences) - Composition - General, and disable flowed e-mails.

See also

External links