http://www.perlmonks.org?node_id=86452


in reply to Simple Email Check

Three things:

1) For testing purposes use

use CGI::Carp qw(fatalsToBrowser);

This will show you your errors in the browser instead of making you have to look in the error logs

2) Add in lots more print statements as you go along. For example you'll want to print out:

$message_count = scalar keys (%$messages);

to see if you actually have any messages!

3) And finally $connect->top($msg) doesn't return a string, it returns an array ref, so your loop should look like this instead:

foreach $msg (keys %$messages) { my $r = $connect->top($msg); my $m = join ("<BR>",@$r); $grab .="<tr><td> $m </td></tr>"; }

I ran your script with those changes and it worked just fine. Good luck!

Replies are listed 'Best First'.
Re: Re: Simple Email Check
by Kiko (Scribe) on Jun 07, 2001 at 17:10 UTC
    Hi,

    I've made the changes you told me and it works fine from
    home, thanks. Now the reason i wrote this script was so
    that i can check my pop3 emails from work since they block
    access to yahoo, hotmail, and any other pop3 emails out
    there. I'm sitting behind a firewall and i think that's
    what's preventing me from connecting from work. It
    say's "Unable to establish a POP3 connection to
    pop.mail.yahoo.com." If you guys know a way around this
    maybe by connecting through a proxy or something let me
    know. That will be very helpful and greatly appreciated.

    Thanks,
    Kiko
      What you wrote *is* a proxy. If you install it on a server not behind a firewall you should be able to use it from work.