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
  5. 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 appreciated:)

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?