Email Multiple File Attachments From Solairs / AIX / HP-UX / UNIX / Linux Command Line
Task: Email reports.tar.gz File
Type the uuencode command as follows:
uuencode reports.tar.gz reports.tar.gz | mailx -s "My Report" you@cyberciti.biz
Please note that the file name "reports.tar.gz" appears twice on the uuencode command line. You must use same name twice.
Task: Email new office photo along with text message read from a file
Type the command as follows;
(cat mymessage.txt; uuencode office.jpeg office.jpeg) | mail -s "Subject" you@cyberciti.biz
Task: Send multiple attachments in a single email
Type the command as follows:
$ uuencode r1.tar.gz r1.tar.gz > /tmp/out.mail
$ uuencode r2.tar.gz r3.tar.gz >> /tmp/out.mail
$ uuencode r3.tar.gz r3.tar.gz >> /tmp/out.mail
$ cat email-body.txt >> /tmp/out.mail
$ mail -s "Reports" you@cyberciti.biz < /tmp/out.mail