Sending Email from the Command Line

You must first fix the sendmail configuration*

Using the mail command

Pipe it through mail

Fixing the sendmail configuration is non-trivial. Read up on how to do this.

Examples:
mail -s "here's a file" someone@somewhere.com < some_info.txt
grep "asset allocation" 2003_*.txt | mail investigations@nato.int

Tasks:

Tip:



* Maybe fixed in Panther (Mac OS X 10.3)?

Previous - Search-and-Replace in Text Files

Next - Connecting to Another Machine on The Internet

Home


List of Links:

  1. Matisse's description of how to fix the sendmail configuration.
  2. O'Reilly Article on Fixing the sendmail configuration.