Viewing File server/test/smtp.sh of 1.20.0b
|
1: #!/usr/bin/php -q 2: <?php 3: require("../base/tests.inc.php"); 4: if ($argc<2) 5: { 6: echo "Usage: smtp.sh hostname [port] [timeout]\n"; 7: exit(); 8: } 9: echo "Connection Test\n"; 10: if ($argc==2) $r=smtp_test_connect($argv[1]); 11: if ($argc==3) $r=smtp_test_connect($argv[1],$argv[2]); 12: if ($argc==4) $r=smtp_test_connect($argv[1],$argv[2],$argv[3]); 13: echo "Result: ".$r."\n\n"; 14: 15: echo "Connection Time\n"; 16: if ($argc==2) $r=smtp_test_time($argv[1]); 17: if ($argc==3) $r=smtp_test_time($argv[1],$argv[2]); 18: if ($argc==4) $r=smtp_test_time($argv[1],$argv[2],$argv[3]); 19: echo "Result: ".$r."\n\n"; 20: ?> 21: