Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Answer: select function from Mail::IMAPClient

( #206531=categorized answer: print w/ replies, xml ) Need Help??

Q&A > mail and news > select function from Mail::IMAPClient contributed by jlongino

You probably want to use the Results method (without argument) to obtain the server response from the last IMAP client command issued:
use strict; use warnings; use Mail::IMAPClient; use Data::Dumper; my $host = 'some.server.net'; my $id = 'login'; my $pw = 'password'; my $folder = "/somepath/tomail/folder"; my $imap = Mail::IMAPClient->new( Server => $host, User => $id, Password => $pw, Debug => 1, ) or die "Cannot connect to $host as $id: $@"; $imap->select($folder); my @results1 = $imap->Results; my @status = $imap->status($folder); my @results2 = $imap->Results; my $uidnext = $imap->uidnext($folder); my @results3 = $imap->Results; print Dumper(\@results1, \@status, \@results2, $uidnext, \@results3);

--Jim

Comment on Answer: select function from Mail::IMAPClient
Download Code
Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (9)
As of 2014-09-17 21:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

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











    Results (100 votes), past polls