12-05-2005
2,
0
Join Date: Dec 2005
Last Activity: 21 August 2008, 6:12 AM EDT
Posts: 2
Thanks Given: 0
Thanked 0 Times in 0 Posts
Email in Ksh using elm
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
Last edited by srikanth78; 12-05-2005 at 05:18 AM..