home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gold Fish 2
/
goldfish_vol2_cd1.bin
/
files
/
comm
/
mail
/
listserv
/
s
/
sendmailinglist
< prev
next >
Wrap
Text File
|
1994-05-24
|
1KB
|
37 lines
/* SendMailingList
*
* written by Peter Simons
*/
parse arg listname
tmpname = 'T:'listname'.tmp'
tmpname2 = 'T:'listname'_new.tmp'
if (open(tmpfile, tmpname, "w")) then do
do forever
line = readch(stdin, 64000)
writech(tmpfile, Line)
if eof(stdin) then break
end
close(tmpfile)
end
command = "ListSERV:c/Cat <" || tmpname || " >>ListSERV:groups/" || listname || "/Log"
address COMMAND command
command = "rx ListSERV:s/MailListFilter <" || tmpname || " " || listname || " >T:" || listname || "_new.tmp LimitXHeaders"
address COMMAND command
if (exists("ListSERV:groups/" || listname || "/Signature")) then do
command = "ListSERV:c/Cat <ListSERV:groups/" || listname || "/Signature >>" || tmpname2
address COMMAND command
end
command = "ListSERV:c/ListMail <" || tmpname2 || " ListSERV:groups/" || listname || "/list"
address COMMAND command
command = "Delete " || tmpname || " T:" || listname || "_new.tmp QUIET"
address COMMAND command