in reply to attach with unix mail

okay, i know you said the question was unix in nature and not perl, but since this is perl site, i am going to offer you a perl answer.

you can use the Mail::Sender module to easily send attachments. Below is an example of such:
ref ($sender = new Mail::Sender({ from => 'you@abc.com', smtp => 'smtp.server.com'} )) or die "$Mail::Sender::Error\n"; (ref ($sender->MailFile({ to =>'recipient@xyc.com', subject => "Here is the file", msg => "Attached is your file", file => "$filename" }))