Send a mail with a subject and an attachement

Dear All:

I want to send a message to a list of people with a subject and an attachement, currently I am using the following command into a shell script:

uuencode $FILENAME.gz $FILENAME.gz | mail john.kennedy@mycompany.com m.m@mycompany.com

With this command I can send the message for a lot of people with the attachement but I can not send the subject, could somebody help me please?

Best Regards

Jose

uuencode $FILENAME.gz $FILENAME.gz | mail -s "Subject Here" john.kennedy@mycompany.com m.m@mycompany.com

Checkout Faq page: Answers to Frequently Asked Questions - UNIX and Linux Forums