source:
trunk/essentials/dev-lang/perl/lib/Net/demos/pop3@
3298
| Last change on this file since 3298 was 3181, checked in by , 19 years ago | |
|---|---|
| File size: 352 bytes | |
| Line | |
|---|---|
| 1 | #!/usr/local/bin/perl -w |
| 2 | |
| 3 | use blib; |
| 4 | use Net::POP3; |
| 5 | use Getopt::Long; |
| 6 | |
| 7 | $opt_debug = 0; |
| 8 | $opt_user = undef; |
| 9 | |
| 10 | GetOptions(qw(debug user=s)); |
| 11 | |
| 12 | $pop = Net::POP3->new('backup3', Debug => $opt_debug ? 6 : 0); |
| 13 | |
| 14 | $user = $opt_user || $ENV{USER} || $ENV{LOGNAME}; |
| 15 | |
| 16 | $count = $pop->login($user); |
| 17 | |
| 18 | if($count) |
| 19 | { |
| 20 | $m = $pop->get(1); |
| 21 | print @$m if $m; |
| 22 | } |
| 23 | |
| 24 | $pop->quit; |
Note:
See TracBrowser
for help on using the repository browser.
