home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / unix / shell / 3643 < prev    next >
Encoding:
Text File  |  1992-08-26  |  1.6 KB  |  46 lines

  1. Newsgroups: comp.unix.shell
  2. Path: sparky!uunet!cs.utexas.edu!torn!watserv2.uwaterloo.ca!watserv1!garfield!jsbazine
  3. From: jsbazine@garfield.waterloo.edu (Steve Bazinet)
  4. Subject: Re: mail script
  5. Message-ID: <BtLrpw.7Jw@watserv1.uwaterloo.ca>
  6. Sender: news@watserv1.uwaterloo.ca
  7. Reply-To: jsbazine@garfield.waterloo.edu
  8. Organization: Department of Computing Services, University of Waterloo
  9. References: <3495@babcock.cerc.wvu.wvnet.edu>
  10. Date: Wed, 26 Aug 1992 18:08:20 GMT
  11. Lines: 33
  12.  
  13. In article 3495@babcock.cerc.wvu.wvnet.edu, abmg@cathedral.cerc.wvu.wvnet.edu (Aliasghar Babadi) writes:
  14. >
  15. >
  16. >Hi,
  17. >        I have a file of email addresses. I want to send the same mail
  18. >to each address in the file, separately (one address in the mail header
  19. >for each one). Is there any script that I can use for that. Thanks.
  20.  
  21.  
  22. Ok if you file of email addresses looks like the following it pretty easy.
  23.  
  24. userid1@whatever
  25. userid2
  26. userid3@whaterver.whaterver.edu
  27.  
  28. this will work as long as you have one userid per line.
  29.  
  30. 1) first write up you mail message using your favorite editor
  31.  
  32. 2) at the prompt tpye the following:
  33.     [%] foreach i ( `cat useridfilename` )       /*notice the back quotes around cat*/
  34.       ? mail -s "Your Subject" $i < youmailfile
  35.       ? end
  36.  
  37. That's it.  You could also put the above line is to a script file.
  38.  
  39. Steve
  40. ---
  41. ===============================================================================
  42. =                               Steve Bazinet                                 =
  43. =         Department of Computing Services - University of Waterloo           =
  44. =    jsbazine@garfield.uwaterloo.ca  (or)  jsbazine@watserv1.uwaterloo.ca     =
  45.  
  46.