in reply to Mail with Attachment in UNIX

You could look at Mail::Sender, it appears that it will do what you want.

May the Force be with you