Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

how to read the yahoo Inbox mail using www::Mechanize module?

by vasanthgk91 (Sexton)
on Aug 07, 2013 at 05:51 UTC ( #1048249=perlquestion: print w/ replies, xml ) Need Help??
vasanthgk91 has asked for the wisdom of the Perl Monks concerning the following question:

SEE my coding..how i read Inbox mail after submission?

sub loginyahoomail() { my ( $user, $password ) = @_; my $mech = WWW::Mechanize->new(); $mech->get( "https://mail.yahoo.com" ); my $c = $mech->content; if ( $c =~ m/login_form/ ) { print "Login form coming===\n"; $mech->form_name( 'login_form' ); $mech->set_fields('$user','$password'); $mech->submit(); } $c = $mech->content; print "$c"; }

After what i will do i don't know

Comment on how to read the yahoo Inbox mail using www::Mechanize module?
Download Code
Re: how to read the yahoo Inbox mail using www::Mechanize module?
by Anonymous Monk on Aug 07, 2013 at 06:46 UTC

      Select Folder failed on Folder Stats

      use Mail::Client::Yahoo; my $y = Mail::Client::Yahoo->login( username => 'vasanthgk91@yahoo.com', password => 'password', secure => 0 ); my $Inbox=$y->select_folder('inbox'); print "$Inbox";

      This is also not working

        This is also not working

        This is the point. Look at the bug cue. Look at the source. Stop trying this. Look at YPOPs! -- 9 years is an ETERNITY to keep scraping yahoo, and after this eternity the developers stopped trying. Try this instead, ask yahoo how to programmatic-ally access their website and see what they tell you.

Re: how to read the yahoo Inbox mail using www::Mechanize module?
by marto (Chancellor) on Aug 07, 2013 at 08:10 UTC

    Why are you trying to scrape a web interface to a mailbox when they provide IMAP access? I think you need to research the technology underlying the services you're trying to access. Attempting to scrape this violates their terms of service. They're also a really poor email platform these days IMHO, and have been for some years.

Re: how to read the yahoo Inbox mail using www::Mechanize module?
by Anonymous Monk on Aug 07, 2013 at 13:33 UTC
    sub loginyahoomail() {
    Don't put those parentheses in there. Prototypes are bad, mmkay?

    Also, you're probably calling your functions in the "wrong" way (with the &) if Perl is letting you call that sub with the two arguments it is expecting.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1048249]
Approved by davido
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (7)
As of 2014-09-23 07:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (210 votes), past polls