E-mailing Multiple Attachments in AIX


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting E-mailing Multiple Attachments in AIX
# 1  
Old 05-11-2010
Question E-mailing Multiple Attachments in AIX

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)
Code:
uuencode <attachment.pdf> <attachment.pdf>|mailx -s <subject> <mail_id> < <Message_file.txt>

2)
Code:
(cat $msg; uuencode $attach1 in1.txt ; uuencode $attach2 in2.txt ) | mailx -m -r "subject" abc@xyz.com

3.
Code:
(  cat body.txt 
   uuencode pic.jpg pic.jpg
) | mailx -s "subject" abc@xyz.com


Last edited by Scott; 05-12-2010 at 03:25 AM.. Reason: Please use code tags
# 2  
Old 05-11-2010
Quote:
Originally Posted by Gem_In_I
3. ( 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?
Code:
(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
# 3  
Old 05-12-2010
I tried after adding semicolon(Smilie 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... ??
# 4  
Old 05-12-2010
Hi.

Yes, it's possible.

Code:
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)
!

# 5  
Old 05-12-2010
Scottn, I tried ur code, but getting 1 file as an attachments only!! Same Problem
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Read mail attachments in AIX

Hello All, Is there a way to read/view email attachments in AIX? Here's my scenario; I have users that will being scanning documents for digital storage. To make it easier for the users, I would like for them to scan and email the pdf version of the document directly to one of my AIX... (3 Replies)
Discussion started by: bbbngowc
3 Replies

2. Shell Programming and Scripting

Mailing multiple PNG attachments using sendmail

Need assistance in using the below script and having multiple png file attachments in the same script . Your inputs are appreciated. I dont have uuencode , I use either mailx, sendmail, mpack . ( echo "to: samplemail@somewhere.com" echo "from: samplemail@elsewhere.com" echo "subject:... (2 Replies)
Discussion started by: ajayram_arya
2 Replies

3. Shell Programming and Scripting

Multiple attachments using mutt

I am trying to attach multiple files using mutt command, and all file names to be attached are taken from a flat file. and mutt command is called from a bash script when : 1. Script execution is completed. 2. Script execution is interrupted for some reason. ... (8 Replies)
Discussion started by: Shaishav Shah
8 Replies

4. Shell Programming and Scripting

Problem with multiple mail attachments

Hi everyone... I am facing problem with the multiple mail attachments. cd /work/mohan/pi_log/ mail_file='uuencode ahmedabad.csv ahmedabad.csv ; uuencode ahmedabad_devrpt_20110530.csv ahmedabad_devrpt_20110530.csv' ( $mail_file ) | mailx -m -s"test" domain@website.com its giving me error... (1 Reply)
Discussion started by: mohanm
1 Replies

5. AIX

Mailing from AIX 5.3 to windows mail system.

Hi, I want to mail a log from my IBM AIX 5.3 server to my windows mailbox in my company every month. Any ideas what the command would be? Do I need to set any smtp settings? Thanks (2 Replies)
Discussion started by: jfd7000
2 Replies

6. AIX

Aix Unix Mailx Attachments

I'm trying to send a mailx with an attachment, really I have not do it in a long time. I forgot (3 Replies)
Discussion started by: darioa
3 Replies

7. Shell Programming and Scripting

Sending multiple attachments

Hi people, I am new to this forums. I have a quick question I hope one of you could help me with. I am writing a script to send attachments via email. However I am having trouble when trying to send multiple attachments. Here is the code I am using: send_mail() { uuencode $TMP $TMP1 > $TMP1... (1 Reply)
Discussion started by: deo2k8
1 Replies

8. UNIX for Advanced & Expert Users

mailing with attachments in mail command in HP-UX Release 11i

Hi Can some one tell me how to send a mail with body and file attached in a shell sript, in HP-UX Release 11i. i did code in AIX and it works fine but i guess here in HP-UX release.. there's some syntax change which i;m not able to make out.. TIA, Ronnie (1 Reply)
Discussion started by: rosh0623
1 Replies

9. Answers to Frequently Asked Questions

multiple attachments

how can you send multiple attachments in 1 email, usually I just use uuencode to send 1 attachment. thanks (5 Replies)
Discussion started by: edog
5 Replies

10. How do I send email?

multiple attachments

how can you send multiple attachments in 1 email, usually I just use uuencode to send 1 attachment. thanks (5 Replies)
Discussion started by: edog
5 Replies
Login or Register to Ask a Question