#!/bin/csh -f #--------- mail a msgfile to a list of addresses without mailalias # usage: mail2list addressfile msgfile # ###........ enter the subject here: set subject = 'this is the subject' echo "" echo " ---> the subject is: " $subject echo "" echo " ---> ^C to enter the desired subject in the mail2list script " # could make it interactive some day... set addressfn = "$1" set msgfn = "$2" echo " --- syntax: mail2list addressfn msgfn ---" if( "$1" == "" ) then echo echo -n " ---> enter addressfn: " set addressfn = $< endif if( "$2" == "" ) then echo echo -n " ---> enter msgfn: " set msgfn = $< endif # # foreach address (`cat $addressfn`) echo "--- sending to $address ---" #mailx -F -s "$subject" $address < $msgfn #creates copy of msg in ./ mailx -s "$subject" $address < $msgfn sleep 2 end