The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Email Question - two email addresses jyoung Shell Programming and Scripting 5 08-04-2008 10:00 AM
email tc01947 Forum Support Area for Unregistered Users & Account Problems 0 05-07-2008 05:32 AM
Send email where # is in the email address - Using Unix jingi1234 UNIX for Dummies Questions & Answers 1 05-23-2005 08:23 AM
Unable to send eMail from a UNIX-Host ( using mailx ) to a Outlook-email-addres(Win) Vetrivela UNIX for Advanced & Expert Users 2 02-15-2005 06:43 AM
Email Kobecheez UNIX for Dummies Questions & Answers 1 10-24-2000 09:29 PM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-04-2005
Registered User
 

Join Date: Dec 2005
Posts: 2
Stumble this Post!
Question 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 01:18 AM.
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 12-06-2005
linuxpenguin's Avatar
Registered User
 

Join Date: May 2002
Location: India
Posts: 295
Stumble this Post!
>> But this will only let me send the mail to all the people in the same time.

hmm, I dont get you, do you intend to send the mail with different time stamps ?
or do you intend to use the date field from the text file to be part of the email body ?
__________________
War doesnt determine who is right, it determines who is left
Reply With Quote
  #3 (permalink)  
Old 12-06-2005
Registered User
 

Join Date: Dec 2005
Posts: 2
Stumble this Post!
Unhappy

What i am trying to do is to send mail to all the email addresses in the text file at the same time. But i want to put all the email addresses in the bcc field so that the people do not see each others addresses.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 11:44 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0