#!/usr/bin/perl -w use strict; # File readpop.pl # David Drake use Net::POP3; use Mail::Header; use FileHandle; use Net::SMTP; #to send mail use Time::Local; # for seconds from 1/1/1970 usage # Here we create the pop object and attempt to login my $pop = Net::POP3->new('goodhost.com', Timeout => 10, Debug =>1) or die "Cant connect to host: $!\n"; #we have connected successuflly my $muser = 'goodname'; my $passwd='goodpass'; $pop->login($muser,$passwd) or die "No Login ",$pop->message; #The above generates the login error die "Success\n"; ************************************************** Here is the output, from the POP3 debug # ./readpop.pl Net::POP3>>> Net::POP3(2.28) Net::POP3>>> Net::Cmd(2.26) Net::POP3>>> Exporter(5.58) Net::POP3>>> IO::Socket::INET(1.27) Net::POP3>>> IO::Socket(1.28) Net::POP3>>> IO::Handle(1.24) Net::POP3=GLOB(0x9ef7988)<<< +OK Hello there. Net::POP3=GLOB(0x9ef7988)>>> USER goodname Net::POP3=GLOB(0x9ef7988)<<< +OK Password required. Net::POP3=GLOB(0x9ef7988)>>> PASS .... Net::POP3=GLOB(0x9ef7988)<<< -ERR Login failed. No Login Login failed.