I have a txt file which contains the following details.
email address date other
email address date other
from this i want to take each email address and send mail with a message and put the date in the message ( in some specific place ).
need to send mails one by one marking a copy to myself.
please help
The script is given below what i have developed. But this will only let me send the mail to all the people in the same time.
i belive a for loop can do this for me. Please help me.
TXTFILEFR="a.out"
TXTSIGN="signature2.txt"
DIRECTO="/opt/var/"
SQLDIRECTO="/opt/var/so"
SUBJECT="Your attachment"
A="a.b@log.com"
export ORACLE_SID=sid
for user in $(cut -d: -f3 a.out)
do
echo $user
echo "Hello, \n" > ${DIRECTO}/mail.out
echo "\n message1.\n" >> ${DIRECTO}/mail.out
echo "\message2.:\n" >> ${DIRECTO}/mail.out
echo "\n mesg3.:\n" >> ${DIRECTO}/mail.out
cat ${DIRECTO}/${TXTSIGN}>> ${DIRECTO}/mail.out
${DIRECTO}/mail.out
elm -s " subject line " -b $user < ${DIRECTO}/mail.out
done