how to send an email with some body content and attachment

hi
plz help me in sending a mail with some data in body and an attachment as some txt file.
currently i am able to send mail with some body content, i need an example how to send the same along with attachment.
thanks in advance
-bali

check the FAQ section

Try this

(echo "$CONTENT \n"\
; uuencode $ATTACH_OUTPUT_FILE $ATTACH_FILE_NAME)\
| mail -s "$SUBJECT" "$MAIL_ADD"

Here CONTENT is the content of the file
CONTENT="Hi All, PFA the file"
ATTACH_OUTPUT_FILE is the file name along with path on disk
ATTACH_OUTPUT_FILE="/tmp/records.dat"
ATTACH_FILE_NAME is the file name you want to appear in the mail.
ATTACH_FILE_NAME="Employee Records.txt"
SUBJECT is subject of your mail
MAIL_ADD is the mail address.