Mailx
Encyclopedia
mailx is a Unix
Unix
Unix is a multitasking, multi-user computer operating system originally developed in 1969 by a group of AT&T employees at Bell Labs, including Ken Thompson, Dennis Ritchie, Brian Kernighan, Douglas McIlroy, and Joe Ossanna...

 utility program for sending and receiving mail, also known as a Mail User Agent program. It is an improved version of the mail
Mail (Unix)
mail is a command line email client for Unix and Unix-like operating systems.-Example usage:mail -s "You've got mail" -c cc.rider@example.org somebody@example.com anotherbody@example.net...

 utility.

mailx is a lightweight console application
Console application
A console application is a computer program designed to be used via a text-only computer interface, such as a text terminal, the command line interface of some operating systems or the text-based interface included with most Graphical User Interface operating systems, such as the Win32 console in...

 mail program which has a command syntax similar to ed
Ed (text editor)
ed is a line editor for the Unix operating system. It was one of the first end-user programs hosted on the system and has been standard in Unix-based systems ever since. ed was originally written in PDP-11/20 assembler by Ken Thompson in 1971...

.

Usage

A simplified syntax with some commonly used options is:

mailx [-s subject] [-c cc-addr] to-addr . . .
-s subject of email (could be inserted later)
-c send carbon copies to a user or users

The end of message is indicated by a single '.' or by hitting ctrl+d.

By default, messages are composed in mailx line by line, without the use of a text editor
Text editor
A text editor is a type of program used for editing plain text files.Text editors are often provided with operating systems or software development packages, and can be used to change configuration files and programming language source code....

. The user may issue a command to mailx by entering a line that begins with a tilde (~). The ~v command causes mailx to invoke a text editor (defined by the VISUAL environment variable
Environment variable
Environment variables are a set of dynamic named values that can affect the way running processes will behave on a computer.They can be said in some sense to create the operating environment in which a process runs...

) on the message in progress, saved in a temporary file.

Example usage
$ mailx -s "From mailx" abc@cde.com

type the body
...
EOT (Ctrl+d)
$

External links

  • History of mail and mailx from the Heirloom Project
    Heirloom Project
    The Heirloom Project is a collection of traditional Unix utilities. Most of them are derived fromoriginal Unix source code, as released as Open Source by Caldera and Sun.The project has the following components:...

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK