If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Unix Shell Scripts > email via shell scripting

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-05-04, 05:33
jaan jaan is offline
Registered User
 
Join Date: Feb 2004
Posts: 5
Question email via shell scripting

I have a MS Word file with information about some people. I want to retrieve their email ids from this information and send them emails with a pre defined message. This has to be done using Unix Shell Scripting. Now this entire system has to be automated as in after every 24 hours this process should happen automatically.
I need this urgently. Please help!!!!
Reply With Quote
  #2 (permalink)  
Old 02-05-04, 08:14
TimoV TimoV is offline
Registered User
 
Join Date: Dec 2003
Posts: 56
Step 1: move the data from the word doc into a format unix can handle (like tab seperated text)
Step 2: give us an idea of the layout of the files so we have some idea on what data etc you want to work with...
Reply With Quote
  #3 (permalink)  
Old 02-05-04, 08:19
jaan jaan is offline
Registered User
 
Join Date: Feb 2004
Posts: 5
Quote:
Originally posted by TimoV
Step 1: move the data from the word doc into a format unix can handle (like tab seperated text)
Step 2: give us an idea of the layout of the files so we have some idea on what data etc you want to work with...
I have retrieved the email ids from the word file.
Now I want to send emails to these ids. I was thinkin gof using mailx. Is it right ?
Reply With Quote
  #4 (permalink)  
Old 02-06-04, 11:22
skd skd is offline
Registered User
 
Join Date: Sep 2003
Posts: 71
#email.sh
================================
read eid
while
do
cat msg_file | mailx -s "subject_of_email" ${eid}
done < file_with_email_id
================================
// if works then put this script in cron.
for syntax and more info, see 'man cron'
Reply With Quote
  #5 (permalink)  
Old 02-09-04, 07:31
jaan jaan is offline
Registered User
 
Join Date: Feb 2004
Posts: 5
Hey!
Thanks a lot!
it worked well..........



Quote:
Originally posted by skd
#email.sh
================================
read eid
while
do
cat msg_file | mailx -s "subject_of_email" ${eid}
done < file_with_email_id
================================
// if works then put this script in cron.
for syntax and more info, see 'man cron'
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On