Message reformats in the mail editor

After typing the message and before sending it, you can reformat the message to improve its appearance by using the fmt shell program.

Before reformatting a message, make sure the following conditions are true:

  1. The mail program must be installed on your system.
  2. The fmt command must be installed on your system.

At the beginning of a new line while in the mail editor, you can use the fmt command as shown in the following example:

Item Description
~| fmt Changes the appearance of the message by re-flowing the information for each paragraph within defined margins (a blank line must separate each paragraph). The pipe (|) subcommand pipes the message to standard input of the command and replaces the message with the standard output from that command.

Attention: Do not use the fmt command if the message contains embedded messages or pre-formatted information from external files. The fmt command reformats the header information in embedded messages and may change the format of pre-formatted information. Instead, use the ~e or ~v subcommand to enter a full-screen editor and reformat the message.