1753776 Members
7620 Online
108799 Solutions
New Discussion юеВ

mailx attachments

 
Rpger Tavener
Occasional Advisor

mailx attachments

Is it possible to attach more than one ascii file to a mailx message? That is, does mailx support multiple file attachments?

Thanks
When the only tool you own is a hammer, every problem looks like a nail!
2 REPLIES 2
SHABU KHAN
Trusted Contributor

Re: mailx attachments

Roger,

Sure ...

Suppose if there are mutiple files in your directory called "test1, test2, test3....." you could try something like this

for File in `ls -1|grep test`; do
uuencode ${File} ${File.txt} | mailx -m -s 'test' mail@addr.com
done

you could also try sendmail in place of mailx and also elm..

There are many threads out there in the forum... try a search with "mailx" "attachment".. and you will see what I am mean..

Thanks,
Shabu
Robin Wakefield
Honored Contributor

Re: mailx attachments

Hi Roger,

Here's what I'd use, e.g.:

(echo here they are
uuencode /tmp/h1 /tmp/h1.txt
uuencode /tmp/g1 /tmp/g1.txt) |
mailx -m -s "multi files" robin.wakefield@ubsw.com

Rgds, Robin.