#!/usr/bin/perl -w

# Usage: sendit06.pl <txtmsg> <email-addresses> <attempts-list> <delay #> <msgslimit>
#        and it expects a file called smtppwd.txt in a location specified
#        below. The <delay> between msgs is in seconds, and the delay used is
#        100-200% of that delay, averaging 150% of the seconds value.
#        The <msgslimit> is the number of messages to send before stopping.
# Example:  sendit06.pl sendit06.17Nov05.textmsg sendit06.17Nov05.do  sendit06.17Nov05.done 40 1000
#
# David Harris, Version of 11 Dec 2006 pm 05:50
# [Autoflushes ATTEMPTS buffer, so one can see what the last email
#  was, after some kinds of crash]

#  [Delays 2 seconds before AUTH authentication is 
#  sent, in hope of giving possibly ansynchronous processes enough
#  time to complete before the authentication process begins.]

# ------------------------------------------------
#TESTSHUTDOWN.PL!!!!:

system("shutdown -r -t 60");
exit;