Mail a Text File from the Shell

Would you like an easy way to send files to someone outside of your local network, or quickly test a mail server? Well the old "mail" command is still available, and it comes in handy for sending config files, or using within a shell script. This is all you need: $ mail -s test me@company.com That's the shortcut. If you want more details, you can read the rest of the post... Using the mail command 1) Use Mail Interactively to read mail a) type Mail b) enter the number of the message to read, press enter c) press space to page down, n for next message d) ? for help e) q to quit 2) Use mail Interactively to send mail a) type mail command followed by email address b) Enter subject, press enter c) Enter text of message d) press Ctrl-d on a line by itself when finished e) Enter CC: if desired, or press Ctrl-d again $ mail user@company.com Subject: test Here is my test message <Ctrl-d> Cc: <Ctrl-d>$ For a little less work, add the subject to the command prompt. ...