7.3. Plain Text Email Clients

Most modern email clients allow the user to select whether they want to send their emails in plain text or in HTML. HTML formatted email can contain formated text, graphics, and interactive links to Web sites. The particular font can be specified, the layout is very controllable, textures, and pictures or backgrounds can be added; all this makes for a visually appealing message when it gets to the recipient.

On the other hand, plain text email is just that — plain text. There is nothing fancy, there are no pictures embedded in the email, and there are no special fonts.

The term plain text refers to textual data in ASCII format. Plain text (also called clear text) is the most portable format because it is supported by nearly every email application on various types of machines.

This chapter discusses the mutt plain text email client.

7.3.1. Using Mutt

Mutt is a small but very powerful text-based mail client for UNIX operating systems.

The configuration file for Mutt, ~/.muttrc, is highly configurable. Because a user can control nearly all of the functions within Mutt, new users sometimes run into problems with initial configuration.

Most of the options for Mutt are invoked using the set or unset commands, with either boolean or string values, e.g. set folder = ~/Mail.

All configuration options can be changed at any time by typing a [:] followed by the relevant command. For example :unset help turns off the keyboard command hints at the top of the screen. To turn those hints back on, type :set help.

If you cannot remember the command, there is always tab-completion to help.

You do not have to type all your preferred configuration commands each time you run mutt, you can save them in a file which is loaded every time the program starts up. This configuration file must exist in your home directory, and it must be named either ~/.muttrc or ~/.mutt/muttrc.

When you launch mutt (by typing mutt at a shell prompt), a screen appears with a list of email messages. This initial menu is called the index.

Figure 7-8. mutt Main Screen

These messages are in a default mail folder, called the inbox or mailspool. Use the [K] and [J] keys on your keyboard to move the highlighted cursor up and down the list of messages.

In the index or pager views, use the [R] key to reply to a message or the [M] key to create a new one. Mutt prompts for the To: address and the Subject: line. A text editor (defined by your $EDITOR environmental variable in the configuration file) then launches, allowing you to compose your message. Type your message, save your file and exit the editor.

After editing the email, Mutt displays the compose menu, which allows you to customize your message headers, change the encoding, add file attachments or press the [Y] key to send your email on its way.

To learn more about mutt, refer to the man pages for muttrc and mutt (type man muttrc or man mutt at the shell prompt). You may also find the mutt manual to be very helpful. The mutt manual is installed in /usr/share/doc/mutt-1.2.x/, where x is the version number of mutt installed on your system.