default color: lavender w/red vlinks)
change to: default, lav, whi, gra, ora

Mail-Penguin: Main

last updated: Sunday, 24-Jan-1999 02:50:21 EST
[an error occurred while processing this directive]   visit to this page
[ write to Jeff ]

print "\nPoller2 for wellnow.com\n";
print "I will poll in intervals of ";
print "$interval_between_polling seconds.\n\n";

	#############################################
	# do forever, or until Ctrl-C or SIGINT:    #
        #                                           #
	# - get Mail Server ID# as number from      #
        #   command line; program is invoked as:    #
        #                                           #
        #      C:\perl poll2.pl 2 1 (etc.)          #
        #                                           #
	# - logon to server and get a count of      #
        #   waiting mail;                           #
        #                                           #
	# - if $waiting_mail_count == 0, move on    #
        #   to next mailbox connection;             #
        #                                           #
	# - else, fetch-and-stash-and-analyze-and-  #
        #   rewrite-and-deliver-mail;               #
        #                                           #
	# - then sleep awhile, and start again      #
        #############################################

do
{
    &notify_time_date("Getting mail on ",".\n\n");

    foreach $mx (@ARGV)
    {

        &logon_to_pop_server;

        if ($waiting_mail_count == 0) { next; }

        print "\a";  # bell/beep
        &fetch_waiting_mail_if_any;
    }

    print "  (sleeping $interval_between_polling...)\n\n";
    sleep $interval_between_polling;

} until 1 > 2;  # end of 'do', end of main

to sub logon_to_pop_server