Sending email with attachment from Linux using mpack

Type the following from Linux command prompt (all in 1 line):

for i in `cat mailing`; do mpack -s “Your subject here” -d message -c image/jpeg picture.jpg $i; done

Please change -c parameter with the correct mime type. For example use application/pdf for PDF file.

Mpack can be downloaded from ftp://rpmfind.net/linux/dag/redhat/7.3/en/i386/dag/RPMS/mpack-1.6-1.rh7.rf.i386.rpm

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s