How do I send MIME attachments with the mail command?

Use the mpack command to do this. Mpack is not a standard HP-UX
command so source from Google. Once installed you can email
attachments, this example is to email a .gz file.

/usr/local/bin/mpack -s "Subject field" $FILE $ADDRESS

FILE is the file to attach and ADDRESS is the email address to
use. Without specifying the content type, mpack will read $FILE and
determine it’s format.


I'm a freelance UNIX engineer working in the UK. I'm married to Tina and between us we have six children. I'm a bit of an Apple fan boy, and all the Windows machines in the house are a thing of the past now.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: