Sending mutiple files thru email to lotus notes

Hi All,

I am currently using the following script to send the single file to one/more email addresses. I need to send mutilple files at same time, are there anyway I could modify the script or write new one to accomplish the same.

Script
***************
#!/bin/ksh

# Author: Manish Vijayvergiya
# Purpose: Script to mail the processed error reports
# ModDate: 20070329

# Create the list of users to mail
export MAILLIST="richard@coty,manish_vijayvergiya@coty"

export MAILCMD=$(which mail)

# Mail the report to the prospective users
${MAILCMD} -s "Error Reports for $(date +%x)" ${MAILLIST} < /ec/rpt/err/pperrorOTHR10.rpt
******************************************

Thanks in advance, please help me.
Manish

Please see the mail topics in the frequently asked questions section.

  • u can simply zip multiple files into one file using zip command
  • then send that zip file as attachment in the mail

devesh

Thanks all for the response.
I did zip the file but it goes as inline text, I want to send as an attachment?

***********************************
#!/bin/ksh

# Author: Manish Vijayvergiya
# Purpose: Script to mail the error report to users based on the chain ids
# ModDate: 20070413

# Create the list of users to mail
export MAILLIST="manish_vijayvergiya@coty"

export MAILCMD=$(which mail)
cd /ec/rpt/err
#ls pperrorOTHR* > fl_list
#set fl=fl_list
tar -cvf rpt.tar pperrorOTHR60.rpt pperrorOTHR10.rpt pperrorOTHR31.rpt
gzip -c rpt.tar > rpt.gz

# Mail the report to the prospective users
${MAILCMD} -s "Error Reports for $(date +%x)" ${MAILLIST} < rpt.gz

*************

Please help?

once again, browse the FAQs