#!/perl/bin/perl @ARGV; $BaseDir = $ARGV[0]; open (REPORT_FILE, '>>report.html'); $count = 0; #if (-e 'c:\program files\netscape\seamonkey\x86rel\pop3test.exe') $PopFile = $BaseDir . '\pop3test.exe'; if (-e $PopFile) { open (STDOUT, ">popresult.txt"); select STDOUT; $| =1; open (STDIN, "GetExitCode( $ExitCode ); $ProcessObj->Kill( $ExitCode ); close (STDOUT); close (STDIN); open (POPRES_FILE, '< popresult.txt'); $ThisLine = ""; $count = 0; while () { $ThisLine = $_; chop ($ThisLine); if ((/User Name: smoketst/) || (/Pop Server: nsmail-1/) || (/Pop Password: l00N!e/)) { $count = 0; } if (/Ya'll got mail!/) { $count = 0; } } if ($count == 0) { print (REPORT_FILE "
\n"); print (REPORT_FILE "\n"); print (REPORT_FILE "POP TEST PASSED"); print (REPORT_FILE "\n"); print (REPORT_FILE "
\n"); } else { print (REPORT_FILE "
\n"); print (REPORT_FILE "\n"); print (REPORT_FILE "POP TEST FAILED"); print (REPORT_FILE "\n"); print (REPORT_FILE "
\n"); } } else { print (REPORT_FILE "\n"); print (REPORT_FILE "Pop3Test.exe File does NOT exist"); print (REPORT_FILE "\n"); } close (REPORT_FILE); close (POPRES_FILE); print (REPORT_FILE "
\n"); print (REPORT_FILE "
\n"); print (REPORT_FILE "\n"); print (REPORT_FILE "\n");