Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


How to send multiple email attachments from AIX?

Posted on 2004-10-21
Medium Priority
Last Modified: 2013-11-17
Does anybody know of a way to send multiple attachments within a single email (for AIX).

We currently use the following programs for sending emails:
* "sendmail": Will send an email, but with no attachments at all.
* "mpack": Will send an email with only one attachment.

The one that I am currently experimenting with:
* "metasend": Which will send multiple attachments, but changes the filename to always have a .txt extension.  I have managed to change the file description (before the extension) but the file always has a .txt at the end (eg FILENAME.CSV.txt).  I am setting the MIME type as text/plain to avoid any data formatting/conversion (any other ideas are much appreciated), which is why the .txt always appears at the end... very frustrating.

Does anybody know how to overcome the file naming issue with metasend, or does anybody know of any other (preferably easier to use) programs that can send multiple emails within an email, while maintaining the file format and filename & extension.

I have looked around on the net but have been unsuccessfull in locating anything that would be able to help.
Any ideas would be much appreciated.
Question by:JosipKulundzic
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 62

Expert Comment

ID: 12378806
The problem is that you read mails in outlook that changes file names for some mime types, like text/plain
LVL 14

Accepted Solution

sjm_ee earned 2000 total points
ID: 12379307
I recommend "mutt" (http://www-1.ibm.com/servers/aix/products/aixos/linux/download.html). Just like "mail" except that you can use "mutt -s 'Subject of mail' -a first-attachment -a second-attachment user@dest.net <body.txt".

Expert Comment

ID: 12380711
You can also try this method, using sendmail:
Example: I want to send file.one and file.two as attachments to sombody@somewhere.com

uuencode file.one file.one >temporary.file
uuencode file.two file.two >>temporary.file
cat temporary.file | mail -s "two files attached" somebody@somewhere.com

Note on uuencode - first parameter is input file name, second parameter is name you want the attachment to have when it is received by someone else. The names can be the same or different.
uuencode will encode the attachment. In the first case, I am creating a new holding file. In the second case, I am appending to the holding file created by the first uuencode. The holding file is a single file containing all attachements. The holding file will appear as ASCII text, containing the encoded attachments.
If the recipient is on a UNIX system, he/she will need uudecode.
PC & Mac recipients should not need any helper application, as most personal computer mail applications can handle this type of attachment.

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

LVL 38

Expert Comment

ID: 12396964
Have a look at the shell script in http:Q_21072849.html


you can also zip/gzip/tar the files into one and send it

Author Comment

ID: 12540561
Thanks ppl for all your effort.

I have tried mail, mpack, sendmail and metasend, and all had issues of some sort.
I found the mutt to be the cleanest and simplest to use for multiple attachments.
Thank you all.


Expert Comment

ID: 14775145

In addition to reply of "jonkreisler"  foll. should work fine...

cat file1 file2 |  mail -s "two files attached" somebody@somewhere.com


Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (http://www.experts-exchange.com/OS/Unix/BSD/FreeBSD/A_3660-S…
Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question