CS167/177/457 Spring 1998

Using E-Mail

Introduction

Electronic mail (e-mail, or even email) is the preferred way of communicating with users of a computer network. Using e-mail any user can send messages to any other user, and also receive messages from anyone. It is also possible to send small amounts of data, such as source code, or test data through the e-mail system. There are several ways of using mail on UNIX, but there are four main ways: the program 'mail', the program 'pine', the mail reader in Netscape navigator, and the commands 'rmail' and 'mail' within the emacs editor.

The program 'mail'

Typing 'mail' at the UNIX prompt runs the standard mail reader. If there are messages waiting, a list of mail headers is displayed, giving the sender, a short `subject' of the message, and other information. At the end of the list is a prompt character, a '?'. Each message can be read by typing its number (usually numbered from 1) and Return (or Enter), or or just by typing Return to browse them in order. The messages can be deleted or saved, or a message can be replied to, i.e. you can send a message back to the sender. Mail may be sent by typing 'mail login' at the prompt, where login can be substituted by the login name of any user. Several users can receive one message if several login names are added to the end of the command. A prompt for a (short) subject will follow, and then you can type any number of lines, and terminate the message with a period and Return, or a ctrl-D on a separate line to send the message. Note that you must end each line with a Return (or Enter) because mail does not automatically break lines. For these commands, and many more, type 'man mail' at the UNIX prompt to read the instructions for using the mail program.

The other reason for using 'mail' is to submit assignments using e-mail in an easy fashion. To send a source code file called 'myfile.c' to a person whose login name is 'fred', type 'mail fred < myfile.c' at the UNIX prompt. The less-than sign tells UNIX to copy the file into the mail program and send it all in one go.

Using Pine

Many people find pine to be an easy-to-use substitute for mail. It is menu driven, runs on any terminal since it only uses character displays, and enables 'attachments' which are easy ways to send non-character information. Just type 'pine' at the UNIX prompt and follow the menus.

 

Using Netscape Navigator

All the UNIX machines will run the latest version of the Netscape navigator, which is mainly using for browsing on the internet. However, if it is configured properly it can also be used for reading mail. You will need help if you want to go this way.

Using emacs

The last method is to use commands in the editor emacs to send and receive e-mail. This is a lot better than using mail since you have all of the editor's commands available when you compose messages. To read mail type 'Esc X' to get the 'M-x' prompt in the command line, and then type 'rmail' and Return. If there are messages waiting, the screen will show the first unread message. You can then read, save, reply to and delete the messages with single character commands. Here is a summary of basic commands: