Mailing thru UNIX shell script

Hi,
I need to send an email from an UNIX shell script along with an attachment.
I am working on an HP-UX 11.00 system. The only mailing program which provides adding an attachment to a mail is "pine". However pine is not installed on my system and I cannot install it too due to the server being a production server. The only solution I have is to make do with any pre-installed mail programs.
The only mail programs I saw on HP-UX is mail, mailx, elm, sendmail . I would really like to know of any program which will allow me to send attachments along with the mail thru the shell script.
Also the attachment format will always be binary.

Any help will be greatly appreciated.

See this.

With HP_UX you can use mailx or sendmail.

If your mailx isnt configured properly you will have to use sendmail. Scripted it would look like this:

uuencode name_of_file Name_you_want | sendmail address

The only issue is that sendmail doesnt allow you to set a subject header for the mail.

cat filename | mailx -s'Subject here' address

will read the file and send the file as the body of the message.

If your mailx is setup right then:

uuencode filename yourfilename | mailx -s'Subject here' address

jiin