home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / unix / question / 14895 < prev    next >
Encoding:
Internet Message Format  |  1992-12-22  |  2.5 KB

  1. Path: sparky!uunet!spool.mu.edu!sdd.hp.com!saimiri.primate.wisc.edu!ames!nsisrv!Pt!postmaster@hq.af.mil!lpeters
  2. From: lpeters@postmaster@hq.af.mil (Leslie D Peters)
  3. Newsgroups: comp.unix.questions
  4. Subject: Re: Mailing to multiple people without each person seeing a list of all
  5. Keywords: elm, mail
  6. Message-ID: <15391@hq.hq.af.mil>
  7. Date: 22 Dec 92 21:14:14 GMT
  8. References: <BzLLLo.KxF@unix.amherst.edu>
  9. Sender: news@Pt.hq.af.mil
  10. Reply-To: lpeters@marge.hq.af.mil
  11. Organization: 7th Communications Group
  12. Lines: 53
  13.  
  14. In article <BzLLLo.KxF@unix.amherst.edu>, rjyanco@unix.amherst.edu (Richard J. Yanco) writes:
  15. |> I send a daily mailing out to approximately 10 people from my account.
  16. |> If I have the names in a file foo.bar, is there any way to send a message
  17. |> to each person in the list, *independently*, with a single command?
  18. |> 
  19. |> One option is obviously to
  20. |> 
  21. |>   mv foo.bar .forward
  22. |> 
  23. |> and mail myself.  But this is no good; mail might come in, and get bounced
  24. |> where I don't want it.
  25. |> 
  26. |> Another option suggested to me was
  27. |> 
  28. |>   elm -s "Subj" `cat foo.bar` <message
  29. |> 
  30. |> but every individual recipient gets a list of all recipients, which
  31. |> is not what I want.  I'd like the equivalent of
  32. |> 
  33. |>   elm -s "Subj" harry@some.place.edu <message
  34. |>   elm -s "Subj" bob@another.place.edu <message
  35. |>      ...
  36. |>   elm -s "Subj" jane@final.place.edu <message
  37. |> 
  38. |> rather than
  39. |> 
  40. |>   elm -s "Subj" harry@s.p.e bob@a.p.e ... jane@f.p.e <message
  41. |> 
  42. |> 
  43. |> 
  44. |> Is there any easy way to do this?
  45. |> 
  46. |> (Email preferred.)
  47. |> 
  48. |> Thanks-
  49.  
  50. I would try:
  51.  
  52. for i in `cat foo.bar`; do <mail package> -s "Subj" $i < message; done
  53.  
  54. --
  55. /============================================================================\
  56. |                                            |                               |
  57. |                    ___                     |                               |
  58. |       ___....-----'---`-----....___        |   I haven't lost my mind --   |
  59. | =========================================  |                               |
  60. |        ___`---..._______...---'___         |    it's backed up on          |
  61. |       (___)      _|_|_|_      (___)        |           tape somewhere.     |
  62. |         \\____.-'_.---._`-.____//          |                               |
  63. |           ~~~~`.__`---'__.'~~~~            |   lpeters@marge.hq.af.mil     |
  64. |                   `~~~'                    |                               |
  65. |                                            |     Les Peters                |
  66. \============================================================================/
  67.