Sending a File by Mail

If you have a file called apple.txt and you want to mail its contents to to nobody@december.com with the subject line "unix-asg1," you can do this using the Unix mail program like this:
$ mail nobody@december.com
Subject: unix-asg1
~r apple.txt
.
Cc:                      
$ 

Note that the ~r apple.txt starts in column 1. Also the period (.) to end the mail message is in column 1.

Note that some Unix mail programs may ask you for the "Cc:" right after entering the Subject line. Some mail programs may require you to hold down the Control key and the D key at the same time to end the mail message rather than a period in column 1.

Check out this mail reference for more mail commands.

Save this page to any social bookmarking site! Share · Search · Market · Directory
2015-11-01 · John December · Contact · Terms of Use © December Communications, Inc.