On Thu, 2016-02-11 at 17:34 -0800, wes wrote:
> On Thu, Feb 11, 2016 at 5:22 PM, Rich Shepard <[email protected]>
> wrote:
>
> > On Thu, 11 Feb 2016, Jim Lewinson wrote:
> >
> > > How about if you have a cron job that looks every hour in a given
> > > directory, and selects the first file and sends it?
> > >
> > > The file contains the subject and the addresses, and after sending it, it
> > > is deleted.
> > >
> > > Then, you just put the files into that directory when you want to send
> > them,
> > > and otherwise the script wakes up and just goes back to sleep for an
> > hour.
> >
> > Jim,
> >
> > That could work ... as long as I remember to delete the top-most file
> > after it's sent.
> >
> > Thanks,
> >
> > Rich
> >
>
> the script would delete (or move) the file at the end.
>
> -wes
I think that would work best. The logic could look like:
if [ mailfile ]; then
while [ addresses ]; do
send mail to top addresslist
remove top addresslist
done
remove mail
fi
Then it's just a matter of cp'ing the mail and address files into place
one time. Unless you have the complication of trying to send a second
mail while the first is still in process.
--
David Fleck <[email protected]>
_______________________________________________
PLUG mailing list
[email protected]
http://lists.pdxlinux.org/mailman/listinfo/plug