| Line 99... | Line 99... | 
          
            | 99 |  
 | 99 |  
 | 
          
            | 100 | die "Could not find the getMailScript [$getMailScript] in $MY_DIRECTORY\n" unless -e $getMailScript;
 | 100 | die "Could not find the getMailScript [$getMailScript] in $MY_DIRECTORY\n" unless -e $getMailScript;
 | 
          
            | 101 | die "Could not find the processMailScript [$processMailScript] in $MY_DIRECTORY\n" unless -e $processMailScript;
 | 101 | die "Could not find the processMailScript [$processMailScript] in $MY_DIRECTORY\n" unless -e $processMailScript;
 | 
          
            | 102 | die "Could not find the reportScript [$reportScript] in $MY_DIRECTORY\n" unless -e $reportScript;
 | 102 | die "Could not find the reportScript [$reportScript] in $MY_DIRECTORY\n" unless -e $reportScript;
 | 
          
            | 103 |  
 | 103 |  
 | 
          
            | 104 |  
 | - |   | 
          
            | - |   | 104 | #die "$getMailScript\n$processMailScript\n$reportScript\n";
 | 
          
            | 105 | # fetch all messages pending from e-mail accounts
 | 105 | # fetch all messages pending from e-mail accounts
 | 
          
            | 106 | `php $getMailScript` if $CHECKMAIL;
 | 106 | `php $getMailScript` if $CHECKMAIL;
 | 
          
            | 107 |  
 | 107 |  
 | 
          
            | 108 | # get a list of all messages waiting to be processed
 | 108 | # get a list of all messages waiting to be processed
 | 
          
            | 109 | opendir ( my $dh, $UNPROCESSED ) or die "Could not open $UNPROCESSED for read: $!";
 | 109 | opendir ( my $dh, $UNPROCESSED ) or die "Could not open $UNPROCESSED for read: $!";
 | 
          
            | 110 | my @files = map{ "$UNPROCESSED\/$_" } sort grep { ! /^\./ && -f "$UNPROCESSED/$_" } readdir( $dh );
 | 110 | my @files = map{ "$UNPROCESSED\/$_" } sort grep { ! /^\./ && -f "$UNPROCESSED/$_" } readdir( $dh );
 | 
          
            | 111 | closedir $dh;
 | 111 | closedir $dh;
 | 
          
            | 112 |  
 | 112 |  
 | 
          
            | - |   | 113 | #print join( "\n", @files ) . "\n"; die;
 | 
          
            | - |   | 114 |  
 | 
          
            | 113 | my $count = 0;
 | 115 | my $count = 0;
 | 
          
            | 114 | my $results = '';
 | 116 | my $results = '';
 | 
          
            | 115 |  
 | 117 |  
 | 
          
            | 116 | foreach my $thisFile ( sort @files ) {
 | 118 | foreach my $thisFile ( sort @files ) {
 | 
          
            | 117 |    my $exitCode;
 | 119 |    my $exitCode;
 |