attach multiple file in an email


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting attach multiple file in an email
# 1  
Old 01-28-2009
Data attach multiple file in an email

Hello

I have to attach multiple file as an email attachment. here is what i my understanding so far:

1. search in a certain directory that is there any specific file say for example .xml file exist or not
2. if exist then take those file name from the folder and attach it to another text file
3. then run a loop in that text file. pick the first file name from that text file and send it as attachment to the email. run the loop until the end of that text file.
4. i dont want to use zip options
4. a for loop would do the work but i am new to the shell script so i dont know what is the proper statement or how to write it.

i have looked into other similar thread but didn't get anything. any suggestion would be appreciatedSmilie

Last edited by osrukarigor; 01-28-2009 at 05:16 PM..
# 2  
Old 02-03-2009
You can find some tips on this thread, and at this link.

What is the format of the first file, from which these filenames are found? Is it HTML? A plain-text file, with one line per filename? Are these absolute paths, or relative paths? Does every filename have the same (one or two) extension? You mentioned xml. Do these filenames belong in a certain tag or attribute?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Check Error File attach and email zip file

I need something to say if these two file extensions exist in this directory *err and *rpt zip up these files into one zip file and email them to me. If they don't exist wait 2 hours and check again.... Not sure how to determine if I need to do an if then statement or a while true or a for... (1 Reply)
Discussion started by: xgringo
1 Replies

2. Shell Programming and Scripting

Loop multiple directory, find a file and send email

Hello ALL, need a BASH script who find file and send email with attachment. I have 50 folders without sub directories in each generated files of different sizes but with a similar name Rp01.txt Rp02.txt Rp03.txt ...etc. Each directors bound by mail group, I need a script that goes as... (1 Reply)
Discussion started by: penchev
1 Replies

3. Shell Programming and Scripting

Attach multiple index.html file using mutt

Hi I want to attach multiple index.html, index_v2 file using mutt command basically i want first index.html and then index_v2.html file as a body in email , these html files are test reports I am using following command , but it is over writing , any help appreceated ;) mutt -e... (2 Replies)
Discussion started by: madankumar.t@hp
2 Replies

4. Shell Programming and Scripting

How to attach multiple file to send mail command

Hi, i want color effect on mail as well as multiple attachment.I have code but this code is used for single attachment. I am unable to attach more than one file.:wall: I want to send two attachments -ahmed.csv and ahmed1.csv . Sample content: <html> <body> <b> Hi...</b> </body> </html> ... (1 Reply)
Discussion started by: AhmedLakadkutta
1 Replies

5. Shell Programming and Scripting

How to attach multiple .csv files using mutt command

I need to attach all files starting with 'BusinessReport' using mutt command. It could be any number of files in that directory, say BusinessReport_01, BusinessReport_03, BusinessReport_04 etc. Is there a way to attach all files where filename like BusinessReport_* and sent it using mutt... (2 Replies)
Discussion started by: Jassz
2 Replies

6. Shell Programming and Scripting

Not able to attach text in body of email while sending mail with attachment

Hi, We have been trying to send mail with attachment and it is going fine, but when we try to attach a text to the body of the email, we find that the mail is going fine with the body text but the attachment is not going through. We are using ksh. The command that is successfull without the... (6 Replies)
Discussion started by: jmathew99
6 Replies

7. Shell Programming and Scripting

Attach a binary file to email in a script

Hi, I am trying to get an email sent out by the unix ( aix ) system that has a .gz file attached to it. I can get the attachment, but it's not working when being looked at from outlook. I think there is a problem because of the way I am doing it, and the fact that it's binary. I am trying to... (15 Replies)
Discussion started by: fwellers
15 Replies

8. UNIX for Dummies Questions & Answers

How to attach a file in a email

Anyone can help me, in Unix, how can I attach a file in the email? Thank (3 Replies)
Discussion started by: ting123
3 Replies

9. Shell Programming and Scripting

attach multiple files in email

I am trying to send multiple files as attachment in one email, I tried to search but couldn't find. Please let me know if any solutions. (2 Replies)
Discussion started by: mgirinath
2 Replies

10. UNIX for Dummies Questions & Answers

How to use "mail" to attach a file with an email?

echo "content" | mail email@address -s subject Where to attach a file with the email? (2 Replies)
Discussion started by: meili100
2 Replies
Login or Register to Ask a Question