cd ~/Email
Then begin the mail message by issuing the following command - being sure to substitute your userid for "studntXX" and your machine name for "nodeX.class.mhpcc.edu".
mail studntXX@nodeX.class.mhpcc.edu
mail studntXX@nodeX.class.mhpcc.edu
Type in a subject and then a line or two of actual message.
~s This is a New Subject
You may be confused and think this will become part of your mail message because it appears to be in the message body. To prove that the command did what it was supposed to do, use the ~p command to display the true contents of the mail message.
Read the file add.me into your mail message by using the command below. Be sure to use the ~p command to display the mail message afterwards.
~r add.me
~w saved.message
~:set EDITOR=/source/local/bin/pico
You will learn later how you can create a mail configuration file so that mail will know where pico (or any other editor) is installed. Then you will not be required to use the ~:set command above.
mail studntXX@nodeX.class.mhpcc.edu < add.me
Compare your indexed list against the tutorial's to understand the information which is being displayed. In particular, notice the:
The & prompt is your clue that you are in mail's command mode. You are not sending or editing messages to others - you are "doing" your own mail.
If the message is more than one screen in length, it will probably scroll off the screen (this is system dependent). To prevent this, you can specify a "pager" program in the mail configuration file - which will be covered later.
h
f
f *
f 1-2
m studntXX@nodeX.class.mhpcc.edu
!ls
!ls -l
!date
!man cp
If you choose q, then your mail box commands will be applied and your read messages will be placed into a file called mbox in your home directory.
Quit mail by using the q command. Check your home directory for a file called mbox. It contains your undeleted, read mail.
Your previously read mail, however, will be kept in a file (folder) called mbox in your home directory. Assuming that you have completed the previous exercises, you should have several mail messages stored in the mbox folder.
Change directory to your home directory and make sure your mbox file exists:
cd
ls -l mbox
Assuming it does, start mail using your mbox folder:
mail -f mbox
s new.folder
Try saving at least two or three messages to the folder
new.folder
Access the new.folder with the command folder new.folder It should contain the files you saved in the previous step.
folder mbox
Start up mail with your mbox folder using the command mail -f mbox
Mail provides a shorthand for saving files into folders. Since you have done the necessary setup, you can abbreviate the folder pathname specification with a plus sign (+). Save a couple files with the command s +dakine
Now access this folder by the mail folder shorthand: folder +dakine You should see the mail messages you saved from the previous step.
Experiment more if you wish. When you're done, exit mail with the q command. Note that if you list the contents of your Mail subdirectory, you will see the folder you created above.
cat /usr/lib/Mail.rc
# Simple .mailrc file
#
set ask askcc EDITOR=/source/local/bin/pico folder=Mail
set PAGER=more crt=20
You may also see a message about INBOX. This is what pine calls your incoming mailbox. If you had any messages left there from the previous exercises, pine will notify you. It will also tell you if there are none.
Notice that the "To:" line is highlighted. This tells you that pine is ready to have you type in the email address of this message's recipient. Send the message to yourself, being sure to substitute your userid for "studntXX" and your machine name for "nodeX.class.mhpcc.edu" as you did in the previous mail exercises:
studntXX@nodeX.class.mhpcc.edu
Fill in the Subject: field and then type a couple of lines of
message. When you're ready to send the message, type the ^X
command to send it. Pine will prompt you for confirmation - type
y to confirm. The message will be sent and you will be returned
to the Main Menu.
Send at least three additional messages to yourself. Notice that pine will notify you whenever a message arrives.
When you're done exploring the help for the compose screen, use the ^C command to cancel the compose and return to the Main Menu.
The current message will be highlighted. Press the Return key to read it. The message will display, as will new command options. After reading the message, move to the next message by typing the N command.
Try accessing the help screen by typing the ? command. Type the E command to exit help.
You can return to your folder index when you are done reading mail messages by using the I command. Try this. Then use the up and down arrow keys to select different mail messages. Notice how the index changes as you read messages (the N - new message indicator is removed after a message is read).
Pine assumes that once you save a message to a folder, it is no longer needed and so, marks it for deletion. You can "undelete" the message by simply typing the U command.