FILES="file1 file2 file3"
for File in ${FILES}; do
uuencode "${File}" "$(basename ${File}"
done | mailx email@id.com
This works as expected, meaning emailing the files as attachments but with null body. Now what I want is a way to have the Body list the files in order e.g.
file1
file2
file3
I tried to put "echo" inside the loop accomplish it but doesn't seem to help -
FILES="file1 file2 file3"
for File in ${FILES}; do
uuencode "${File}" "$(basename ${File}"
echo "${File}"
done | mailx email@id.com
I get the email with the attachment but get the following garbage in the body of the email:
begin 644 /data/inform/projects/accelya/targetfiles/waiver_rpt.csv
`
end
I've successfully used similar code running on HP-UX (using the -m option) but am now running on Linux where the -m option is not valid for the mailx command. In place of this, I'm using the -m option with the uuencode command but still get the garbage in the email body. Does anyone know how to get rid of this?