mail script

Hi..
I need to create a script which will send a mail with attached file of log whenever its invoked with some text in its body. (Using Sendmail)
I don't have any idea regarding that.

any one help me out with this.

Thanks,

May be this is helpful

How do I send email? - The UNIX and Linux Forums