Firstly, when sending mail,
mail will use the local mail server, so youre going to need to enable mail on your machine no matter what.
Don't worry, it's not a big deal. You don't need to setup your server to handle incoming mail from the network, deal with mail clients, POP, IMAP, etc., just enable the outgoing mail server so that you can send mail.
So, in Server Admin, enable outgoing mail and add your ISP's mail server as the relay server (this is the server it will send all non-local mail to).
Once you've done that you can simply use
mail at the command line via
mail user@domain.com, like:
<pre class=command>localhost $ mail user@domain.com
Subject: This is a test
This is only a test. If this were a real email it might have been worth reading.</pre>
In this example I invoked
mail user@domain.com
mail prompted me for the Subject line, after which I typed in the message. Use Ctrl-D on a blank line to signify the end of the message.
You can also specify the subject line when you invoke mail, using the
-s switch, in which case
mail doesn't prompt you for the Subject line:
<pre class=command>mail -s "this is the subject" user@domain.com</pre>
Finally, if you're trying to capture output from another shell command you can pipe the message into mail:
<pre class=command>cat /path/to/some/file | mail -s "here's the subject" user@domain.com</pre>
Note, though, that the output of the shell command will become the message body - you can't just attach files in this way since they need to be MIME-encoded to get through the mail system.