readmail(1)
NAME
readmail − read mail from specified mailbox
SYNOPSIS
readmail [−p] [−n] [−f filename] [−h]
readmail [−p] [−n] [−f filename] [−h] number-list
readmail [−p] [−n] [−f filename] [−h] pattern
DESCRIPTION
readmail is a program that gives you the functionality of the mailx(1) ~r command from the editor of your choice. There are three different ways to use the program.
• When creating a reply to a message from within elm(1), readmail without any arguments includes a summary of the headers and the body of the message being replied to. If the you are not currently editing a message, readmail returns an error.
• To include certain messages, specify them by listing their ordinal locations in the mail file (i.e., their "message numbers") up to 25 at a time. The meta-number $ is understood to mean the last message in the mailfile. Similarly, ∗ is understood to represent every message in the file (i.e., 1 2 3 4 5 ... $)
• Specify a pattern that occurs in one of the messages as a way of including it. This pattern can be typed in directly (no quotes) if the words are separated by a single space in the actual message. The pattern matching is uppercase/lowercase sensitive, so Hello and hello are not equivalent.
Other options are:
−f folder Use the file specified for the operations specified instead of the incoming mailbox.
−h Include the entire header of the matched message or messages when displaying their text (default is to display the From: Date: and Subject: lines only).
−n Exclude all headers. This is used mostly for extracting files mailed and such.
−p Put form-feeds (Control-L) between message headers. This is useful when printing sets of messages.
EXAMPLES
To use readmail from within vi(1) to include the text of the current message at the end of the edit buffer, use the command:
!!readmail
(when you press the second !, the editor puts you at the bottom of the screen with the ! prompt).
Define a csh(1) alias similar to:
alias rd ’readmail $ | page’
This can be used in conjunction with a program such newmail(1) to peruse mail as it arrives without waiting for a mail system to start up.
AUTHOR
readmail was developed by HP.
FILES
/usr/mail/username
incoming mailbox
$HOME/.elm/readmail
temporary file for elm(1)
SEE ALSO
elm(1), mailx(1), newmail(1), vi(1).
NOTE
For performance reasons when the program is given a list of message numbers to display, they are sorted into ascending order. Thus "1 3 2" produces the same output as "1 2 3".
Hewlett-Packard Company — HP-UX Release 8.05: June 1991