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:
- List two kinds of scripts you might
write where sending email would be useful.
Tip:
- Install the
pine
program if you will be accessing
your system remotely using the
command line.
* Maybe fixed in Panther (Mac
OS X 10.3)?
List of Links:
- Matisse's description of how to fix the sendmail configuration.
- O'Reilly
Article on Fixing
the sendmail configuration.