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. The advantage of HTML formatted email is that they are are graphical (GUI). The particular font can be specified, the layout is very controllable, textures, pictures and 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. They are not fancy, there are no pictures embedded in the email, there are no special fonts. Plain text emails are simple.

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 application on every machine.

This chapter will discuss two plain text email clients, PINE and mutt.

Using Pine

Pine (acronym for pine is not elm or Program for Internet News and Email)is a character-based email client for UNIX systems.

To launch pine, type pine as a command at the system prompt. After starting pine, the Main Menu screen appears.

Figure 7-9. Pine Main Screen

Each pine screen has a similar layout: the top line tells you the screen name and additional useful information, below that is the work area (on the Main Menu screen, the work area is a menu of options), then the message/prompt line, and finally the menu of commands.

From the Main Menu you can choose to read online help, compose and send a message, look at an index of your mail messages, open or maintain your mail folders, update your address book, configure pine, and quit pine. There are additional options listed at the bottom of the screen as well.

To write a message, press [C] (Compose). You see the Compose Message screen.

Figure 7-10. Pine Compose Message Screen

Different commands are available to you when your cursor is in different fields on this screen. To see additional commands available when your cursor is in the Message Text field, type [Ctrl]-[G] (Get Help). For example, to move around, use the arrow keys or [Ctrl]-[N] (Next line) and [Ctrl]-[P] (Previous line); to correct typing errors, use [Backspace] or [Delete].

In the command menu above, the ^ character is used to indicate the Control key. This character means you must hold down the Control ([Ctrl]) key while you press the letter for each command.

When you want to leave Pine, press [Q] (Quit).

To view a message in the Message Index screen, use the arrow keys to highlight the message you want to view. Press [V] (ViewMsg) or press [Enter] to read a selected message. To see the next message, press [N] (NextMsg). To see the previous message, press [P] (PrevMsg) To return from your message to the Message Index, press [I] (Index).

For addition help with pine, refer to the pine man page. To view this man page, type the command man pine at a shell prompt.

Using mutt

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

Mutt's configuration file, ~/.muttrc. gives mutt its flexibility and configurability. It is also this file that might give new users problems. The number of options that mutt has available to it are truly astounding. mutt allows the user to control about every function mutt uses to send, receive, and read your mail. As is true with all powerful software, it takes time to understand the features and what they can do for you.

Most of the options 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 handy keyboard command hints at the top of the screen. To turn those hints back on, press up-arrow to retrieve the last command and change it so it says :set help.

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

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 needs to exist in your home directory, it has to be called either ~/.muttrc or ~/.mutt/muttrc.

When you launch mutt, the first thing you see is a screen with a list of email messages. This initial menu is called the index.

Figure 7-11. mutt Main Screen

These messages are in a default mail folder, often called the mailspool, that you can think of as your inbox. 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 will prompt for the To: address and the Subject: line. A text editor (defined by your $EDITOR environmental variable in the configuration file) will then launch allowing you to compose your message. Type away, when you save and exit, you are done.

After the editor, mutt drops you into the compose menu, here you can fine-tune your message headers, change the encoding, add file attachments or simply hit the [Y] key to say yes and send your email on its way.

To learn more, 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.