.TH elm "" "" "Command"
.PC "An interactive mailer"
\fBelm [\-achkKmrtwz] [\-f \fIalternate-folder\^\fB] [\-d \fIdebug-level\^\fB]\fR
\fBelm [\-s \fIsubject\^\fB] \fIlist of aliases or addresses\fR
.PP
.B elm
is an interactive, screen-oriented mailer.
.II mailer
A
.I mailer
helps you to read mail, reply to mail, and send new mail.
If you handle a large volume of mail, a well-designed mailer can be
one of the most useful programs on your system.
Unlike
.BR mail ,
which is the default \*(CO mailer,
.B elm
uses a visual interface to display all messages that are in your mailbox.
You can use the arrow keys on your keyboard to select a message, read it,
reply to it, then save it or delete it.
.PP
There are three main ways to use
.BR elm :
to send mail, to send files, or to read mail.
The following discusses each in detail.
.SH "Sending Mail"
You can use
.B elm
to send a mail message.
To do so, invoke
.B elm
with one or more addresses on its command line.
.B elm
will prompt you to enter the subject of your message, then place you
into an editor, in which you can type the body of the message.
When you exit from the editor,
.B elm
asks you whether it should send the message, or forget it.
If you reply `S' (for ``send it''),
.B elm
dispatches a copy of the message to each address you name.
.PP
For example, the command
.DM
	elm -s testing joe
.DE
.PP
sends a message to user
.B joe
with the subject
.B testing
indicated, then invokes an editor within which you can type
the body of the message.
Option
.B \-s
says that the following argument gives the subject of the message;
if you do not use this option,
.B elm
prompts you to enter the message's subject.
.PP
Please note that you can use an alias on
.BR elm 's
command line, as well as a full address.
.B elm
will check its own alias files (described below) to expand the alias into
the address.
If the alias is not named in
.BR elm 's
alias files,
.B elm
passes the alias to
.BR smail ,
which check its own alias file in turn.
.B smail
either will expand the alias, or return a mail message that says that it
could not figure out to whom you are sending the message.
.SH "Sending a File"
The second way, used most commonly when transmitting files,
is to specify the subject of the message and the recipients on
the command line, then redirect the standard input to a file.
For example, the command
.DM
	elm -s testing joe < test.c 
.DE
.PP
mails a copy of the file
.B test.c
to user
.BR joe ,
with the subject of the message set to the string ``testing''.
The subject argument is optional.
.SH "Reading Mail"
If you invoke
.B elm
with neither subject nor addresses specified on the command line,
and without the redirecting the standard input, it assumes that you wish
to read your mail.
It then reads the contents of your mailbox
(usually \fB/usr/spool/mail/\fIuser\fR, where
.I user
is your login identifier), then displays the subject and sender
of each message on the screen.
The screen appears something as follows:
.ie p .PH 1 1 \\*(XD/elm.eps
.el \\{
.B1

        Mailbox is '/usr/spool/mail/fred' with 1 message [ELM 2.4 PL11]


  N  1   Jun 24 Fred Butzen        (16)   Test Mail                           











   You can use any of the following commands by pressing the first character;
 d)elete or u)ndelete mail,  m)ail a message,  r)eply or f)orward mail,  q)uit
    To read a message, press <return>.  j = move down, k = move up, ? = help

Command: 

.B2
\\}
.PP
The current message is highlighted by being shown in reverse video.
To read a message, use the arrow keys to move the band of reverse video
to the message you want, then press \*(RT.
.PP
.B elm
then invokes the pager
set by your environmental variable
.B PAGER
(usually,
.BR more )
to display the message.
When you exit from the pager,
.B elm
asks you for a command.
You can enter any of the following:
.IP \*(RT
.B elm
displays the next unread message from your mailbox.
.IP \fBD\fR 0.3i
Delete the current message.
.IP \fBF\fR
Forward the message.
This lets you send a copy of this message to one or more other users.
.B elm
prompts you for the address of the user or users to whom you wish to send it.
.IP \fBI\fR
Return to the index of messages (that is, the list shown you originally
invoked
.BR elm ).
To select a new message, use the arrow keys as described above,
or type its number.
.IP \fBR\fR
Send a reply to this message.
.B elm
asks you if you wish to include the text of the current message within your
reply.
If you do,
.B elm
prefixes each line of the message with the string ``> ''.
Regardless of whether you wish to include the current message,
.B elm
puts you into
the editor of your choice (as set by the environmental variable
.BR EDITOR ).
When you exit from the editor,
.B elm
asks you whether you wish to send the reply (thus giving you one last
chance to throw away an imprudent reply).
.PP
The leftmost column displays one or more codes
that gives the message's status, as follows:
.IP \fB<blank>\fR
The message is new (that is, it has arrived since you last read your mail)
and is still active.
.IP \fBO\fR
The message is old \(em that is, it was already in your mailbox when you
last read your mail.
.IP \fBU\fR
The message was marked ``urgent'' by its sender.
.IP \fBD\fR
You have flagged the message for deletion.
Note that
.B elm
automatically flags a message for deletion when you have saved it into a file.
.PP
When you exit from
.BR elm ,
it asks you whether to delete the messages you had marked for deletion.
If you answer `Y', it does so.
.PP
It then asks you whether to keep the remaining (undeleted) messages in your
mailbox.
If you answer no, it moves them into a file within directory
.BR $HOME/.elm .
(The contents of this directory will be described in more detail below.)
.SH "Command-line Options"
.B elm
recognizes the following command-line options:
.IP \fB\-?\fR 0.3i
Synonymous with the option
.BR \-h .
.IP \fB\-a\fR
Use an ``arrow'' cursor to indicate the current message.
By default, indicates the current message with a bar of highlighting
(an ``inverse bar'').
This is useful when you run
.B elm
over a primitive connection that might become confused by the
control sequences that invoke reverse video.
.IP \fB-c\fR
Check aliases.
.B elm
assumes that the following arguments on its command line name aliases.
(Aliases are decribed in more detail below.)
If
.B elm
finds the alias within one of its alias files,
it displays the address that that alias represents.
.IP "\fB\-d \fIlevel\fR"
Debug, where
.I level
indicates the level of debugging.
.B elm
writes its output into file
.BR $HOME/ELM:debug.info .
.IP "\fB\-f \fIalternative-folder\fR"
Folder:
read file
.I alternative-folder
instead of your mailbox.
By default,
.B elm
reads mailbox \fB/usr/spool/mail/\fIuser\fR, where
.I user
is your login identifier.
.IP \fB\-h\fR
Help:
Give a brief synopsis of
.BR elm 's
command-line options.
.IP "\-i \fIfile\fR"
Include
.I file
within an edit buffer for sending.
.IP \fB\-K\fR
Keypad plus softkeys:
Enable the use of softkeys only on Hewlett-Packard terminals.
.IP \fB\-k\fR
Keypad:
Force
.B elm
to ``know'' about the Hewlett-Packard terminal keyboard,
to allow you to use the
.Kr NEXT ,
.Kr PREV ,
an
.Kr HOME
keys.
.IP \fB-m\fR
Menu off:
Turn off the menu that
.B elm
normally displays at the bottom of the screen.
.B elm
uses the extra lines thus gained for more message headers.
.IP "\fB\-s \fIsubject\fR"
Subject:
Specify subject for message to mail.
.IP \fB\-t\fR
Tite:
Turn off use of the
.B termcap/terminfo
.B ti/te
sequence.
.IP \fB\-v\fR
Version:
Print version and configuration information.
.IP \fB\-z\fR
Zero:
do not enter
.B elm
if no mail is pending.
.SH ".elmrc: elm Resource file"
.II .elmrc
When you first invoke
.BR elm ,
it looks for a file of instructions with which it instructs itself.
It first looks for file
.BR $HOME/.elmrc ;
if this file does not exist, it checks file
.BR $HOME/.elm/elmrc .
If
.B elm
finds one of these files, it reads its instructions, and uses them to
configure itself to your preferences.
.PP
The configuration file can contain the following instructions:
.IP \fBaliassortby\fR
The order into which
.B elm
sorts the list of aliases.
The default is
.BR "Name" .
.IP \fBalteditor\fR
This names the editor
.B elm
invokes when you reply to a message.
By default,
.B elm
invokes the editor named in the environmental variable
.BR EDITOR .
.IP \fBalternatives\fR
Set alternative addresses from which you could receive mail (e.g., a
forwarding mailbox) and that you do not want listed.
.IP \fBalwaysdelete\fR
Always delete every message you have marked for deletion; don't bother
asking confirm deletion.
.IP \fBalwayskeep\fR
Always keep unread messages in your mailbox; don't bother asking to
confirm whether to do this.
.IP \fBalwaysstore\fR
Always store read messages in the directory
.BR received .
.IP \fBarrow\fR
.B elm
normally indicates its current message by displaying its title in
reverse video.
This command tells
.B elm
to mark the current message with the string ``->'' instead of reverse video.
.IP \fBask\fR
When this command is set to
.BR ON ,
.B elm
asks you whether to dispose of messages when it resynchronizes itself or
changes mailboxes.
When set to
.BR OFF ,
it does not, and uses the default reply.
.IP \fBaskcc\fR
When you reply to a message, have
.B elm
prompts you for the users to whom you wish to send a carbon-copy of your reply.
.IP \fBattribution\fR
This gives the attribution string that appears at the beginning of each reply.
.B %s
represents the name of author of the original message.
For example, the command
.DM
	attribution = %s writes:
.DE
.IP
means that when you reply to a message from John Smith and include the
text of his original message in your reply, the string
.DM
	John Smith writes:
.DE
.IP
appears before his text.
.IP \fBautocopy\fR
Name the buffer into which
.B elm
automatically copies a message to which you are replying.
.IP \fBbounceback\fR
Set the threshold at which
.B elm
bounces copies of remote \*(UU messages.
.B zero
tells
.B elm
to disable this function.
.IP \fBcalendar\fR
The file into which
.B elm
saves calendar entries.
.\".IP \fBcharset\fR
.\"Name the character set to use with
.\".BR mime ,
.\"text/plain Content-type.
.\"U.S. ASCII is the default.
.\"If you use a national character set,
.\".B elm
.\"probably needs metamail to display U.S. ASCII.
.IP \fBcompatcharsets\fR
List every character set that is a superset of U.S. ASCII.
This lets
.B elm
to use U.S. ASCII to display messages in these character sets
without requiring
.BR metamail .
.IP \fBconfigoptions\fR
List the options that can be configured through the
.B options
screen.
.IP \fBconfirmappend\fR
Tell
.B elm
always to ask for your confirmation before it appends a message onto any
existing file.
.IP \fBconfirmcreate\fR
Tell
.B elm
always to ask for your confirmation before it creates a new file.
.IP \fBconfirmfiles\fR
Tell
.B elm
always to ask for your confirmation before it appends a message onto any
existing file that is not in your
.B Mail
directory.
.IP \fBconfirmfolders\fR
Tell
.B elm
always to ask for your confirmation before it creates a new file
(or ``folder'') in your
.B Mail
directory.
existing file.
.IP \fBcopy\fR
This command tells
.B elm
to save a copy of every message you send.
.IP \fBdisplaycharset\fR
Name the character set that your display supports.
This is independent of the character set named in the
.B charset
command.
.IP \fBeditor\fR
This sets the editor
.B elm
invokes when you write a message.
Under \*(CO,
.B elm
reads the environmental variable
.BR EDITOR .
Setting
.B editor="none"
tells
.B elm
to simulate Berkeley
.BR Mail .
.IP \fBeasyeditor\fR
This names the editor
.B elm
invokes when you type the command
.B ~e
(when
.BR editor="builtin" ).
.IP \fBescape\fR
Set the escape character with which you give a command to the
.B builtin
editor.
.IP \fBforcename\fR
Copy every inbound or outbound message into a file named after the
login name of its sender or recipient.
If the associated directory does not exist, create it.
.IP \fBforms\fR
Enable the use of AT&T Mail Forms.
.IP \fBfullname\fR
Your full name, as you want it to appear on mail that you send.
.IP \fBkeepempty\fR
Do not delete the directories from which all messages are deleted.
.IP \fBlocalsignature\fR
Name the ``signature'' file whose contents
.B elm
appends onto the end of every local outbound message.
.II .sig.mail
By default,
.B elm
appends the contents of file
.B $HOME/.sig.mail
onto every message you send.
.IP \fBmaildir\fR
The directory into which
.B elm
saves mail.
The default is directory
.BR Mail .
.IP \fBmenu\fR
Use the three-line ``mini'' menu.
This option is useful if you are working over a slow connection.
.IP \fBmetoo\fR
Send yourself a copy of each message you send to an alias that includes
yourself.
Normally, if you mail a message to an alias that includes yourself,
.B elm
does not send you a coyp of the message, in order to help limit the amount
of ``junk mail'' stuffed into your mailbox.
.IP \fBmovepage\fR
Change the message pointer when you use the page commands
scroll up or down the list of messages.
.IP \fBnames\fR
Just show the user's name when expanding an alias;
do not show the name of the site where that user lives.
.IP \fBnoheader\fR
When you reply to a message and include that message's text within your
reply, do not include the message's header.
.IP \fBpager\fR
The program to use for displaying messages.
The default is the pager
.BR builtin .
.IP \fBpointnew\fR
When starting up, point to the first new message received, if possible.
.\" .IP \fBprecedences\fR
.\" List the sites to which mail is sent, in order of precedence.
.\" If this command is empty,
.\" .B elm
.\" allows anything
.\" precedence may be followed by optional ":priority" specification.
.\" HUH?
.IP \fBprefix\fR
Set the sequence with which
.B elm
prefixes each line of text from an original message that you include in
your reply.
The default string is ``> ''.
.IP \fBprint\fR
How you want
.B elm
to print a message in its main display.
The escape sequence
.B %s
represents the file name.
.IP \fBpromptafter\fR
Prompt for a command after you read a message.
.IP \fBreceivedmail\fR
Name the file into which
.B elm
writes received messages.
The default file is
.BR =received .
.IP \fBremotesignature\fR
Name the ``signature'' file whose contents
.B elm
appends onto the end of every message you send to a remote system.
By default,
.B elm
appends the contents of file
.BR $HOME/.sig.mail .
.IP \fBresolve\fR
Emulate the message-increment mode of the mailer
.BR mailx .
In this mode,
.B elm
increments a message only after you ``do'' something to it \(em
not just when you touch it.
.IP \fBsavename\fR
Save every message, both incoming and outgoing, into a file named with the
login identifier of the sender or recipient.
.IP \fBsentmail\fR
Name the file into which
.B elm
saves a copy of each outgoing message.
The default file is
.BR =sent .
By default,
.B elm
does not save a copy of an outgoing message.
.IP \fBshell\fR
The shell to use when you invoke a shell from within
.B elm
(i.e., when you perform a ``shell escape'').
.B elm
normally invokes your default shell.
.IP \fBsigdashes\fR
Print a row of hypens above your signature.
.IP \fBsortby\fR
Set the order into which
.B elm
sorts the contents of your mailbox or mailboxes.
The default is \fBReverse Sent\fR \(em that is, the most recently sent
messages appear first.
To display messages in the order in which they were sent \(em with the
most recently sent messages appearing last \(em use the instruction:
.DM
	sortby = Sent
.DE
.IP \fBsignature\fR
Name the ``signature'' file whose contents
.B elm
appends onto the end of every outgoing message.
.II .sig.mail
The default is
.BR $HOME/.sig.mail .
.\".IP \fBtimeout\fR
.\" elm docs say: "Set the main prompt timeout for resynching."
.\" HUH?
.IP \fBtitles\fR
Tell
.B elm
to include the message's title when it display the message's body.
Normally
.B elm
does not do so.
.IP \fBtmpdir\fR
The directory to hold temporary files.
The default directory is
.BR /tmp .
.IP \fBuserlevel\fR
Set the level of complexity that
.B elm
presents to you:
the higher the number, the more features are available.
Zero indicates that you are a beginner; one indicates intermediate user;
and two or greater indicates that you are an expert.
.IP \fBusetite\fR
Use the
.B termcap/terminfo
.B ti
and
.B te
entries.
.IP \fBvisualeditor\fR
The editor
.B elm
should invoke when you type the command
.B ~v
(when
.BR editor="builtin" ).
.IP \fBweed\fR
Read the list of
.B weedout
entries.
.IP \fBweedout\fR
Throw away every message with this header.
This lets you automatically ``trash'' messages from a
particularly troublesome source.
The command
.B filter
also filters out junk mail, trash, and other unwanted mail.
For details, see its entry in the Lexicon.
.SH Aliases
As noted above, you can send a mail message either to an address or to an
alias.
.PP
An
.I address
is the full name and address of the recipient.
If the recipient ``lives'' on your system, then her name is sufficient;
however, if she lives on another system, you must name that system as well.
For example, to send mail to user
.B anne
on system
.BR lepanto.mwc.com ,
the command would be:
.DM
	elm anne@lepanto.mwc.com
.DE
.PP
As you can see this is rather tedious, and it is easy for you to make a
mistake while typing the address.
.PP
An
.I alias
is a ``nickname'' that you can use instead of a recipient's full address.
You record the alias plus the full address of the user it identifies;
thereafter, you can use the alias instead of the recipient's name and address
when you send a message to that person.
.PP
For details on how to create an alias for
.BR elm ,
see the Lexicon entry for the command
.BR newalias .
.PP
Aliases are used throughout \*(CO's mail system; in particular,
aliases are used by the mail-management program
.BR smail .
Unfortunately, the table of aliases that
.B smail
recognizes is entirely different from the table that
.B elm
recognizes.
Thus, if you establish an alias for
.BR elm ,
that does not mean that
.B smail
recognizes.
(This is one of the drawbacks of the modular design of the \*(CO mail
system, as described in the Lexicon overview entry for
.BR mail ).
For details on how to establish aliases for
.BR smail ,
see the Lexicon entry
.BR aliases .
.SH Files
.nf
\fB/usr/local/bin/elm\fR \(em \fBelm\fR binary
\fB/usr/local/lib/elm-help.*\fR \(em Help files
\fB/usr/local/lib/aliases.text\fR \(em System alias source
\fB/usr/local/lib/aliases.hash\fR \(em System alias hash tablecccg
\fB/usr/local/lib/aliases.data\fR \(em System alias data table
\fB$HOME/.elmrc\fR \(em Configuration instructions
\fB$HOME/.elm/aliases.text\fR \(em User alias source
\fB$HOME/.elm/aliases.dir\fR \(em User alias hash table
\fB$HOME/.elm/aliases.pag\fR \(em User alias hash table
\fB$HOME/.elm/elmrc\fR \(em Configuration instructions (alternative file)
\fB$HOME/.elm/elmheaders\fR \(em Customized message headers
\fB/tmp/snd.$$\fR \(em Outgoing mail editing buffer
\fB/tmp/mbox.\fIlogname\fR \(em Temporary mailbox
\fB$HOME/ELM:debug.info\fR \(em Debugging output, if debugging is turned on
.fi
.SH "See Also"
.B
answer,
autoreply,
checkalias,
commands,
listalias,
mail (overview)
newalias
.R
.\".br
.\"The Elm documentation package, including:
.\".I
.\"The Elm Users Guide,
.\"The Elm Reference Guide,
.\"The Elm Alias System Users Guide,
.\"The Elm Forms Mode Guide,
.\"The Elm Filter Guide,
.\"The Elm Configuration Guide\fR
.\".sp 
.SH Notes
Release 2.4 of
.B elm
is copyright \(co 1988-1992 by The USENET Community Trust.
.II "Taylor, Dave"
It is derived from
.B elm
release 2.0, which is copyright \(co 1986, 1987 by Dave Taylor.
.PP
.B elm
was ported to \*(CO by Mark Williams Company.
.II philippics
.II panegyrics
.II jeremiads
Please send bug reports, philippics, panegyrics, jeremiads,
and other noteworthy messages concerning the \*(CO version of
.B elm
to support@mwc.com.
.B elm
in general is maintained by the Elm Development Group.
.II "Weinstein, Syd"
Please send messages concerning the general design of
.B elm
to Syd Weinstein (elm@DSI.COM).
