Linux Applications
◾
181
look at here is
mailx
although numerous other email programs exist for Linux including
both text-based programs such as elm and Pine, and GUI-based
programs such as Mozilla
Thunderbird and Balsa. All of these programs are
email clients
, not servers. This means
that you would use the given program to read your email messages and send out email
messages or responses.
The
email server
has the responsibility of packaging the email up into a message that
can be transported across the network and delivered to another email server.
An email
message waits on the server until the user accesses the new email via the client. While a
computer can run both an email client and an email server, the two are usually separate
and it is the client’s responsibility to make contact with the server to access new emails or
to send out new emails.
The first Unix
mail program was called
mail
and was eventually in competition against
a different mail program called
Mail
. Today, the most commonly used program is called
mailx
. To avoid confusion, both mail and Mail are symbolically linked to mailx so that
the user could use any of these to start the mailx program. We will refer to the mailx pro-
gram as mail in this section.
5.6.1
Sending Email Messages
To send an email message using mail, the command is
mail
username(s)
. This invokes
the interactive mailx program that first asks you to input a Subject. Then, you are dropped
into a buffer to enter the body of your email. The buffer is not like an editor in that you
are only able to use the backspace key and the enter key when editing your messages. You
enter your
text ending with control
+
d to exit the buffer and send your email. As we are
assuming that your mail program will only permit emails to local users, the usernames are
simply the account names of the users in the system (i.e., there is no extension such as
@someplace.com).
A session may look like the following:
mail zappaf
<
enter
>
Subject:
missing document
<
enter
>
We discovered a missing document in the file you gave us
this morning. It’s the receipt from the sheet music you
said you purchased. Do you know where it is?
<
control
+
d
>
The word Subject: appears after you press the enter key allowing you to enter a subject.
You can press the
<
enter
>
key if you want to omit a subject for this email. You would
receive a message indicating that the email had no subject but it would still be sent.
The mail program allows for a number of options to provide
additional functionality
to the email message you want to send. For instance, to attach a file to the email, use
–a
Do'stlaringiz bilan baham: