Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: how to read the Gmail Inbox using pop3client module?

by syphilis (Chancellor)
on Aug 09, 2013 at 06:12 UTC ( #1048688=note: print w/replies, xml ) Need Help??


in reply to how to read the Gmail Inbox using pop3client module?

Maybe there's no mail waiting there for you ? In that case $pop->Count() will be 0.
You should check to see whether the connection succeeded. The documentation says:
To test for a connection failure, you will need to check the number of + messages: -1 indicates a connection error.
For USESSL to be successful, the documentation also says that you need to have IO::Socket::SSL installed. Do you have that module ?
I would expect that you'd get an error if you don't have that module installed .... however, the documentation suggests that the absence of that module will simply cause the connection to silently fail.

Cheers,
Rob

Replies are listed 'Best First'.
Re^2: how to read the Gmail Inbox using pop3client module?
by vasanthgk91 (Sexton) on Aug 09, 2013 at 07:07 UTC

    Yes I received pop->count() values "-1"..this is connection error i got it.But me IO::Socket::SSL installed properly.In previously yahoo Inbox i read through IO::Socket::SSL module.So IO::Socket::SSL not get problem.But how to solve the connection error in pop3client.This really don't know.

    thank you for your kind replay

      Consult with your network administrator, use a network analysis tool to see what goes over the wire and what connections are made. Maybe Mail::POP3Client has some hints on debugging?

      Also consider the more verbose approach, also listed in the documentation:

      ... $pop2 = new Mail::POP3Client( HOST => "pop3.otherdo.main" ); $pop2->User( "somebody" ); $pop2->Pass( "doublesecret" ); $pop2->Connect() >= 0 || die $pop2->Message(); ...

      That way, you get more information from ->Mesage() maybe.

      I strongly recommend you start reading the documentation of the module and follow the practices outlined there.

        when i try to connect gmail with pop3client..show this information..

        AUTH Web login required: https://support.google.com/mail/bin/answer.py?answer=78754

        How to skip this step..I enabled pop3/IMAP setting inside my mail.Any steps I miss it..Tell i will do..

        Thank you

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1048688]
help
Chatterbox?
[chacham]: there's a regexp function. if that can be used ina check() constraint...
[LanX]: Thanks, but no check constraints in MySQL :/
LanX 1 ..2 ..3 ..4 .. is erix missing ;-)
LanX is Discipulus reciting "Springtime for Hitler" ?
[choroba]: erix could tell you how to do it in Postgres
[LanX]: NOOOOOOOOOOOOOOO not again
[chacham]: wow, mysql really is as bad as i thougt
[choroba]: completion?
[LanX]: That's what he usually does when MySQL is mentioned ;-)

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (11)
As of 2017-03-30 15:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (360 votes). Check out past polls.