Quitting the mail editor

To quit the mail editor without sending the message, use the ~q subcommand or the interrupt key sequence (usually the Alt-Pause or Ctrl-C key sequence).

  1. The mail program must be installed on your system.
  2. To display a message while in the mail editor, you must have started the mail editor. If you need information on this, see Starting the mail editor.

If you have entered any text, the mail command saves the message in the dead.letter file.

At the beginning of a line while in the mail editor, you can use the ~q subcommand as shown in the following example:

Item Description
~q Quits the mail editor and the message is not sent. The message is saved in the dead.letter file in your home directory, unless you have not entered any text. The system prompt is displayed.
Ctrl-C To quit the editor using an interrupt key sequence, press the break (Ctrl-C key sequence) or the interrupt (Alt-Pause key sequence). The following message is displayed:
(Interrupt -- one more to kill letter)
Press break or interrupt again.
(Last Interrupt -- letter saved in dead.letter)

The message is not sent. The message is saved in the dead.letter file in your home directory, unless you have not entered any text. The system prompt is displayed.

Note: When you exit the mail editor without sending the message, the previous content of the dead.letter file is replaced with the incomplete message. To retrieve the file, see Options for adding a file and a specific message within a message.