# Check Connection sub connectInfo{ infoCheck(); #getCfgInfo(); $TA -> delete("0.0", "end"); #settings(); $SA -> configure( -text => ''); $SA -> configure( -text => 'Configuration Retrived'); use Net::POP3; my $res = my $pop = Net::POP3->new($popServ, Debug => 1, Timeout = +> 60) or die "Can't Connect: $!\n"; $TA -> insert('end', "Server Available : $popServ\n", reset) if +($res); $SA -> configure( -text => 'Server Check'); $res = ""; $res = $pop->user($popUser); # or die "Can't Authenticate User: $! +\n";; $TA -> insert('end', "User Logged On : Successful\n", reset) + if ($res == 1); $TA -> insert('end', "User Logged On : NOT successful\n", rese +t) unless ($res == 1); $SA -> configure( -text => 'User Check'); $res = ""; $res = $pop->pass($popPass); # or die "Can't Authenticate Pass: $! +\n";; if ($res > 0) { $TA -> insert('end', "Password Author. : Successful\nServer +Responding : $res Messages Waiting\n") ; } else { $TA -> insert('end', "Password Author. : NOT successful ($re +s)\n"); } $SA -> configure( -text => 'Password Check'); $res = ""; $res = $pop->quit(); $TA -> insert('end', "Log Off Server : Clean Logoff\n\n") +if ($res == 1); $TA -> insert('end', "Log Off Server : Broke Connection\n\n") +unless ($res == 1); $TA -> insert('end', "System Ready\n\n"); $SA -> configure( -text => 'Log off'); }
In reply to Updating a TK window during a sub by JBarsky
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |