home *** CD-ROM | disk | FTP | other *** search
/ Gold Fish 2 / goldfish_vol2_cd1.bin / files / comm / mail / listserv / s / sendmailinglist < prev    next >
Text File  |  1994-05-24  |  1KB  |  37 lines

  1. /* SendMailingList
  2.  *
  3.  * written by Peter Simons
  4.  */
  5.  
  6. parse arg listname
  7.  
  8. tmpname  = 'T:'listname'.tmp'
  9. tmpname2 = 'T:'listname'_new.tmp'
  10.  
  11. if (open(tmpfile, tmpname, "w")) then do
  12.         do forever
  13.                 line = readch(stdin, 64000)
  14.                 writech(tmpfile, Line)
  15.                 if eof(stdin) then break
  16.         end
  17.         close(tmpfile)
  18. end
  19.  
  20. command = "ListSERV:c/Cat <" || tmpname || " >>ListSERV:groups/" || listname || "/Log"
  21. address COMMAND command
  22.  
  23. command = "rx ListSERV:s/MailListFilter <" || tmpname || " " || listname || " >T:" || listname || "_new.tmp LimitXHeaders"
  24. address COMMAND command
  25.  
  26. if (exists("ListSERV:groups/" || listname || "/Signature")) then do
  27.         command = "ListSERV:c/Cat <ListSERV:groups/" || listname || "/Signature >>" || tmpname2
  28.         address COMMAND command
  29. end
  30.  
  31. command = "ListSERV:c/ListMail <" || tmpname2 || " ListSERV:groups/" || listname || "/list"
  32. address COMMAND command
  33.  
  34. command = "Delete " || tmpname || " T:" || listname || "_new.tmp QUIET"
  35. address COMMAND command
  36.  
  37.