use Mail::Box::IMAP4; my $folder = Mail::Box::IMAP4->new(folder => $ENV{MAIL}, ...);
See SYNOPSIS in Mail::Box::Net
Maintain a folder which has its messages stored on a remote server. The communication between the client application and the server is implemented using the IMAP4 protocol. See also Mail::Server::IMAP4.
This class uses Mail::Transport::IMAP4 to hide the transport of information, and focusses solely on the correct handling of messages within a IMAP4 folder. More than one IMAP4 folder can be handled by one single IMAP4 connection.
See DESCRIPTION in Mail::Box::Net
See Different kinds of folders in Mail::Box
See Available folder types in Mail::Box
See Folder class implementation in Mail::Box