how to send the output

Hi,
how to send the output of a command directly to a file. For eg: am issuing metastat -a. How to send the output of this command to a file as well as mail.

to a file

mycommand > newfile

to email

mycommand | /usr/bin/mailx -s 'output of mycommand'  me@my.com

thanks a lot for your timely reply.

or do it in one shot

metastat -a|tee myfile.log |mailx foo@bar.com