Hello Everyone,
I'm trying to write ascript on AIX 5.3, that will e-mail all filles within a directory. But on executing a script , it sends only 1 file from the directory alongwith some Junk data.
I have searched whole forum and almost used all the suggestions, but still getting same problem.
Can anyone help me please??
I have used below codes in my scripts
1)
uuencode <attachment.pdf> <attachment.pdf>|mailx -s <subject> <mail_id> < <Message_file.txt>
2)
(cat $msg; uuencode $attach1 in1.txt ; uuencode $attach2 in2.txt ) | mailx -m -r "subject" abc@xyz.com
( cat body.txt
uuencode pic.jpg pic.jpg
) | mailx -s "subject" abc@xyz.com
( cat body.txt
uuencode pic.jpg pic.jpg
) | mailx -s "subject" abc@xyz.com
Unfortunately I don't have AIX, but maybe it's just a missing semicolon?
(cat body.txt; uuencode pic.jpg pic.jpg) | ...
like it's described here: Email multiple file attachment from Solairs / AIX / HP-UX UNIX/ Linux command line
I tried after adding semicolon( to the code but still not working and getting 1 mail attachment and Junk data
My question, does AIX support sending multiple attachments in e-mail... ??
Scott
May 12, 2010, 2:43am
4
Hi.
Yes, it's possible.
cat << ! | mailx -s "subject" abc@xyz.com
$(cat body.txt)
$(uuencode file1 file1.txt)
$(uuencode file2 file2.txt)
$(uuencode file3 file3.txt)
$(uuencode file4 file4.txt)
!
Scottn, I tried ur code, but getting 1 file as an attachments only!! Same Problem