AnyEvent::IMAP - IMAP client library for AnyEvent
use AnyEvent::IMAP; my $imap = AnyEvent::IMAP->new( host => 'server', user => "USERID", pass => 'password', port => 993, ssl => 1, ); $imap->reg_cb( connect => sub { $imap->login()->cb(sub { my ($ok, $line) = shift->recv; ... } } ); $imap->connect();
AnyEvent::IMAP is IMAP client library for AnyEvent/Perl.
And some methods are usable by Object::Event.
Create a new instance with following attributes.
Send a $command to the server. You can filter the response by optional $filter.
$tag is a IMAP command tag.
$cv is a instance of AnyEvent::CondVar. You can process the server response by following format.
my ($tag, $cv) = $imap->send_cmd('LOGIN'); $cv->cb(sub { my ($ok, $res) = shift->recv; ... });
First response value is $ok. It presents server status is OK or not in boolean value. $res is a response value. You can filter it by $filter in argument.
is available in example/demo.pl
Tokuhiro Matsuno <tokuhirom AAJKLFJEF@ GMAIL COM>
Some of the code taken from Net::IMAP::Client.
Net::IMAP::Client, RFC 2060, AnyEvent
Copyright (C) Tokuhiro Matsuno
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install AnyEvent::IMAP, copy and paste the appropriate command in to your terminal.
cpanm
cpanm AnyEvent::IMAP
CPAN shell
perl -MCPAN -e shell install AnyEvent::IMAP
For more information on module installation, please visit the detailed CPAN module installation guide.