Commit | Line | Data |
406c51ee |
1 | #!./perl -w |
2 | |
302cc833 |
3 | BEGIN { |
4 | unless (-d 'blib') { |
5 | chdir 't' if -d 't'; |
6 | @INC = '../lib'; |
7 | } |
1a8dcddb |
8 | if (!eval "require Socket") { |
9 | print "1..0 # no Socket\n"; exit 0; |
10 | } |
8b14f033 |
11 | if (ord('A') == 193 && !eval "require Convert::EBCDIC") { |
12 | print "1..0 # EBCDIC but no Convert::EBCDIC\n"; exit 0; |
13 | } |
302cc833 |
14 | } |
15 | |
406c51ee |
16 | use Net::Config; |
17 | use Net::SMTP; |
18 | |
19 | unless(@{$NetConfig{smtp_hosts}} && $NetConfig{test_hosts}) { |
20 | print "1..0\n"; |
21 | exit 0; |
22 | } |
23 | |
24 | print "1..3\n"; |
25 | |
26 | my $i = 1; |
27 | |
28 | $smtp = Net::SMTP->new(Debug => 0) |
29 | or (print("not ok 1\n"), exit); |
30 | |
31 | print "ok 1\n"; |
32 | |
33 | $smtp->domain or print "not "; |
34 | print "ok 2\n"; |
35 | |
36 | $smtp->quit or print "not "; |
37 | print "ok 3\n"; |
38 | |