#! /bin/sh # # Filename: massmail # # Programmer: Jasen M. Lentz # # Date: November 19, 1996 # # Purpose: To mass mail a file to a long list of users without the # large header file. # if [ $# != 2 ] then echo "Two parameters needed." echo "Syntax: massmail " exit 1 elif [ ! -r "$1" ] then echo "Cannot read file" "$1" exit 2 elif [ ! -r "$2" ] then echo "Cannot read file" "$2" exit 3 else echo "Please enter a subject for this message" read subject echo "Sending Mail..." while read line do elm -s "$subject" -k "$line" < "$1" > /dev/null echo "Mailing to $line" done < "$2" echo "Mail sent..." fi