Academic Computing Services
QUICK STUDY #31
March 2001

Using Z-Mail Remotely with the Command Line Interface

This quick study briefly describes how to use the Z-Mail mail utility remotely with the command line interface, which you will need to use if you do not have an X-windows connection to RCS.

Starting Z-Mail

If you don't have an X-windows connection, start Z-Mail by entering zmail at a {\ssa UNIX}{\ssc TM} prompt. The Z-Mail program will start, displaying the headers of your most recent mail messages. Some examples appear below.

\begin{alltt}
Z-Mail (2.1.5) 20Sep96): Type ''?'' for help.
[0]+ .newmail: 5 m...
...4 ! TheIRS Sep 20 08:42 (35) Tax audit
(10:44am) .newmail:  ...
The last line indicates the current time of 10:44 a.m., that the mail exists in the RCS file named .newmail, and that you're currently on the third of four messages. The small ``r" in front of the first message indicates that you have replied to that message; the capital ``S" in front of the second message indicates that you have saved that message. (The chevron (>) character indicates the current message; this is important to know because Z-Mail performs whatever command you enter on the current mail message.) The ``N" in front of the third message indicates a new and unread mail message; the exclamation point (!) indicates a message which has arrived even more recently than the ``N" status message.

Reading Your Mail

To read a mail message, enter the word print, or p, followed by the number of the message you wish to read. (If you do not specify a message number, Z-Mail will display the current message.) The beginning of the selected mail message should appear on the screen. If the entire message doesn't fit, a - ``More'' - prompt appears at the bottom of the screen. Press the spacebar to view the next screen of the message; press q to terminate reading the message. To display the next message, enter next. To read the previous message, enter previous.

Composing Mail Messages

From within Z-Mail, you can send mail by entering the command mail userid, replacing userid with the appropriate userid or address. (If you simply enter the command mail, the program will prompt you to enter the recipient's userid at the To: prompt.) If you want to send a mail message, but don't necessarily want to open your mailbox, you can enter zmail userid at a {\ssa UNIX}{\ssc TM} prompt.

Note that, in either case, if you're sending mail to a user with an RCS userid, you do not have to append @rpi.edu to the address; the system automatically assumes it. (Indeed, if you use this portion of the address, it actually slows the mail machine.)

Once you enter the address, the system will prompt you for a one-line subject for your message. Enter the subject; you may now begin typing the body of your mail message. (Please note that no prompt characters appear.)

Editing Your Message

To edit the message as you're typing it, enter $\sim$e to start emacs; enter $\sim$v to start vi (emacs and vi being the default editors). (For a list of other tilde ($\sim$)-escape commands, enter the command $\sim$? from a {\ssa UNIX}{\ssc TM} prompt.) To view your message before sending it, enter $\sim$p.

Cancelling Your Message

If you decide not to send your current mail message at all, enter an interrupt character such as the Ctrl-C key sequence. Z-Mail should respond with a prompt similar to ``interrupt - one more to kill composition"; enter the interrupt character a second time to abort sending the current message.

Sending the Message

When you finish writing your message, press the Ctrl-D key sequence, or enter a single period on the last line, to send the message. An example appears below.

\begin{alltt}
{\bf mail doej}
SUBJECT: {\bf Sample mail}
{\bf This is a test mail message.}
{\bf .}
\end{alltt}

Sending to Multiple Recipients

To send the same mail message to several different people, list all of the e-mail addresses, separated by commas or blanks, in the To: field of your mail message. For example, if you wanted to send mail to each of the Three Stooges (provided they had RCS accounts, that is!), you could enter mail moe, larry, curly in the To: field.

Creating Mail Aliases

If you regularly send mail to a group of multiple recipients, you may want to define a mail alias for that group. For example, if you wanted to create an alias for the Stooges, you could enter the following commands from a {\ssa UNIX}{\ssc TM} prompt.

\begin{alltt}
{\bf alias stooges moe larry curly}
{\bf saveopts}
\end{alltt}
The first command defines the alias (stooges) such that each of the recipients - Moe, Larry, and Curly - will receive a copy of your mail message. When you enter the saveopts command, the program will prompt you if you wish to overwrite your existing .zmailrc file; entering y to do so will save the new mail alias for future use.

Replying to a Message

To reply to the current mail message, enter reply. (You may also enter reply n, where n refers to the number of the mail message to which you wish to respond.) The system automatically fills in the To: and Subject: fields for you. If you wish, you can use the -i option to include a copy of the original message in your reply. Enter Ctrl-D or a single period on the last line of your message to send your reply. Use the replyall command to send a reply message to the sender, as well as to everyone who received a copy of the message.

Quitting Z-Mail

Enter quit to terminate the Z-Mail program entirely. Any messages you deleted will be purged from your mailbox (your .newmail file).


About this document ...

Published by Academic Computing Services, RPI, Troy, NY 12180

Send comments to consult@rpi.edu.