lwicks has asked for the wisdom of the Perl Monks concerning the following question:
_update/idea_ Looking at this I am wondering if I am not getting a connection to the pop3 server, and that in turn is causing the error in the login call?#!/usr/bin/perl -wT use CGI::Carp qw( fatalsToBrowser ); print "Content-type: text/html\n\n"; print "<html><head><title>Test Page</title></head><body>"; $| = 1; use warnings; use strict; eval( "use Net::POP3;" ); die "Module Configuration Error: $@" if $@; my $time = scalar localtime; my $pop3 = "xxx.xxx.xxx"; my $login = "xxx\@xxx.xxx"; my $pass = "xxxxxxxx"; my $pop = Net::POP3->new($pop3); #my $smtp = Net::SMTP->new($ssmtp); $res = $pop->login($login, $pass); if ($res eq "undef"){ print "Couldn't connect $!\n"; } else { print "On $time e-mail status inbox: $res post \n"; } my $i =0; print("Deleting $res mails ...\n"); for($i = 0; $i<$res; $i++) { # $pop->delete($i); } $pop->quit(); print "</html></body>";
Kia Kaha, Kia Toa, Kia Manawanui!
Be Strong, Be Brave, Be perservering!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Can't call method... works locally, but not on webserver.
by davorg (Chancellor) on Nov 08, 2006 at 12:10 UTC | |
by lwicks (Friar) on Nov 08, 2006 at 12:22 UTC | |
by bradenshep (Beadle) on Nov 08, 2006 at 16:46 UTC | |
by jlk (Hermit) on Nov 08, 2006 at 17:54 UTC | |
by bradenshep (Beadle) on Nov 08, 2006 at 19:52 UTC | |
|
Re: Can't call method... works locally, but not on webserver.
by codeacrobat (Chaplain) on Nov 08, 2006 at 22:36 UTC |