home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.shell
- Path: sparky!uunet!cs.utexas.edu!torn!watserv2.uwaterloo.ca!watserv1!garfield!jsbazine
- From: jsbazine@garfield.waterloo.edu (Steve Bazinet)
- Subject: Re: mail script
- Message-ID: <BtLrpw.7Jw@watserv1.uwaterloo.ca>
- Sender: news@watserv1.uwaterloo.ca
- Reply-To: jsbazine@garfield.waterloo.edu
- Organization: Department of Computing Services, University of Waterloo
- References: <3495@babcock.cerc.wvu.wvnet.edu>
- Date: Wed, 26 Aug 1992 18:08:20 GMT
- Lines: 33
-
- In article 3495@babcock.cerc.wvu.wvnet.edu, abmg@cathedral.cerc.wvu.wvnet.edu (Aliasghar Babadi) writes:
- >
- >
- >Hi,
- > I have a file of email addresses. I want to send the same mail
- >to each address in the file, separately (one address in the mail header
- >for each one). Is there any script that I can use for that. Thanks.
-
-
- Ok if you file of email addresses looks like the following it pretty easy.
-
- userid1@whatever
- userid2
- userid3@whaterver.whaterver.edu
-
- this will work as long as you have one userid per line.
-
- 1) first write up you mail message using your favorite editor
-
- 2) at the prompt tpye the following:
- [%] foreach i ( `cat useridfilename` ) /*notice the back quotes around cat*/
- ? mail -s "Your Subject" $i < youmailfile
- ? end
-
- That's it. You could also put the above line is to a script file.
-
- Steve
- ---
- ===============================================================================
- = Steve Bazinet =
- = Department of Computing Services - University of Waterloo =
- = jsbazine@garfield.uwaterloo.ca (or) jsbazine@watserv1.uwaterloo.ca =
-
-