The 'mail' command uses sendmail to... aah... send the mail
You are going to need to configure sendmail to do what you want it to do.
Have a look at what you have in /etc/mail and check out the various configuration files.
There are complete textbooks on how to configure sendmail, but here's a site that has some sample configurations and doc's.
http://www.sial.org/sendmail/