Mail-Box-POP3-4.02/0000755000175000001440000000000015166137310014307 5ustar00markovusers00000000000000Mail-Box-POP3-4.02/Makefile.PL0000644000175000001440000000400315166137306016263 0ustar00markovusers00000000000000use ExtUtils::MakeMaker; require 5.016; use warnings; use strict; # Use command 'oodist' to produce your whole software release. my $version = '4.02'; my $git = "https://github.com/markov2/perl5-Mail-Box-POP3"; my $publish = "../public_html/mail-box-pop3"; my $homepage = "http://perl.overmeer.net/CPAN/"; my %oodist = ( oodoc_version => 3.05, first_year => 2001, email => "markov\@cpan.org", include => [ '../Mail-Box', '../Mail-Message', '../Mail-Transport', ], use => [ ], parser => { syntax => 'markov', skip_links => [ ], pmhead => undef, }, tests => { }, release => { publish => "$publish/source", }, raw => { publish => "$publish/raw", }, generate => [ { # Add real pod to the releases format => 'pod3', podtail => undef, }, # You may add HTML formatters here. # You may add exporter configurations here. ], ); my %requires = ( 'Digest::MD5' => 0, 'IO::Socket' => 0, 'IO::Socket::IP' => 0, 'List::Util' => 0, 'Log::Report' => '1.42', 'Socket' => 0, 'Mail::Box' => '4.02', 'Mail::Transport' => '4.01', ); WriteMakefile NAME => 'Mail::Box::POP3', VERSION => $version, AUTHOR => 'Mark Overmeer', ABSTRACT => 'Mail::Box connector via POP3', LICENSE => 'perl_5', META_MERGE => { 'meta-spec' => { version => 2 }, resources => { repository => { type => 'git', url => "$git.git", web => $git, }, bugtracker => { web => "$git/issues", }, homepage => $homepage, license => [ 'http//dev.perl.org/licenses/' ], }, prereqs => { runtime => { requires => \%requires, }, develop => { requires => { 'OODoc' => '3.00', }, }, test => { requires => { 'Test::More' => 1.00, 'Test::Pod' => 1.00, 'File::Spec' => 0, 'File::Basename' => 0, }, }, }, # You may use multiple set-ups, see "oodist --make" x_oodist => \%oodist, }; Mail-Box-POP3-4.02/lib/0000755000175000001440000000000015166137310015055 5ustar00markovusers00000000000000Mail-Box-POP3-4.02/lib/Mail/0000755000175000001440000000000015166137310015737 5ustar00markovusers00000000000000Mail-Box-POP3-4.02/lib/Mail/Transport/0000755000175000001440000000000015166137310017733 5ustar00markovusers00000000000000Mail-Box-POP3-4.02/lib/Mail/Transport/POP3.pod0000644000175000001440000002775215166137306021202 0ustar00markovusers00000000000000=encoding utf8 =head1 NAME Mail::Transport::POP3 - receive messages via POP3 =head1 INHERITANCE Mail::Transport::POP3 is a Mail::Transport::Receive is a Mail::Transport is a Mail::Reporter =head1 SYNOPSIS my $receiver = Mail::Transport::POP3->new(...); my $message = $receiver->receive($id); =head1 DESCRIPTION Receive messages via the POP3 protocol from one remote server, as specified in rfc1939. This object hides much of the complications in the protocol and recovers broken connections automatically. Although it is part of the MailBox distribution, this object can be used separately. You probably should B module, but L. This module is the interface to POP3, whereas L hides the protocol weirdness and works as any other mail folder. Extends L<"DESCRIPTION" in Mail::Transport::Receive|Mail::Transport::Receive/"DESCRIPTION">. =head1 METHODS Extends L<"METHODS" in Mail::Transport::Receive|Mail::Transport::Receive/"METHODS">. =head2 Constructors Extends L<"Constructors" in Mail::Transport::Receive|Mail::Transport::Receive/"Constructors">. =over 4 =item $class-EB(%options) Create a new pop3 server connection. One object can only handle one connection: for a single user to one single server. If the server could not be reached, or when the login fails, this instantiating C will return C. Improves base, see L -Option --Defined in --Default authenticate 'AUTO' executable Mail::Transport undef hostname Mail::Transport 'localhost' interval Mail::Transport 30 password Mail::Transport undef port Mail::Transport 110 proxy Mail::Transport undef retry Mail::Transport ssl_options undef timeout Mail::Transport 120 use_ssl false username Mail::Transport undef via Mail::Transport 'sendmail' =over 2 =item authenticate => 'LOGIN'|'APOP'|'AUTO'|'OAUTH2'|'OAUTH2_SEP' Authenthication method. The standard defines two methods, named LOGIN and APOP. The first sends the username and password in plain text to the server to get permission, the latter encrypts this data using MD5. When AUTO is used, first APOP is tried, and then LOGIN. OAUTH* requires the authorization token to be passed as Password. Microsoft Office365 needs C, where other oauth2 implementations use C. =item executable => $file =item hostname => $host|\@hosts =item interval => $span =item password => $password =item port => $port =item proxy => $path =item retry => $count|undef =item ssl_options => HASH Unless overruled, C will be set to C and C to C You can also set the SSL parameters via IO::Socket::SSL subroutine set_defaults. Connections will get restarted when they are lost: you have to keep the defaults in place during POP actions. =item timeout => $span =item use_ssl => BOOLEAN =item username => $username =item via => CLASS|$name =back =back =head2 Attributes Extends L<"Attributes" in Mail::Transport::Receive|Mail::Transport::Receive/"Attributes">. =over 4 =item $obj-EB() Z<> =item $obj-EB() Z<> =item $obj-EB() Returns C when SSL must be used. =back =head2 Receiving mail Extends L<"Receiving mail" in Mail::Transport::Receive|Mail::Transport::Receive/"Receiving mail">. =over 4 =item $obj-EB( [$unique_message_id] ) Inherited, see L =back =head2 Exchanging information =over 4 =item $obj-EB() Mark all messages that have been fetched with L for deletion. See L. =item $obj-EB(BOOLEAN, @ids) Either mark the specified message(s) to be deleted on the remote server or unmark them for deletion (if the first parameter is C). Deletion of messages will take place B when the connection is specifically disconnected or the last reference to the object goes out of scope. =item $obj-EB() Break contact with the server, if that (still) exists. Returns C if successful. Please note that even if the disconnect was not successful, all knowledge of messages etc. will be removed from the object: the object basically has reverted to the state in which it was before anything was done with the mail box. =item $obj-EB() Returns a reference to a list of ID's that have been fetched using L. This can be used to update a database of messages that were fetched (but maybe not yet deleted) from the mailbox. Please note that if the POP3 server did not support the UIDL command, this method will always return C because it is not possibly to reliably identify messages between sessions (other than looking at the contents of the messages themselves). See also L. =item $obj-EB() Returns the total number of octets used by the mailbox on the remote server. =item $obj-EB
( $id, [$bodylines] ) Returns an ARRAY which contains the header of the message with the specified C<$id>. A C is returned if something has gone wrong. The optional integer C<$bodylines> specifies the number of lines from the body which should be added, by default none. » example: my $ref_lines = $pop3->header($uidl); print @$ref_lines; =item $obj-EB($id) Translates the unique C<$id> of a message into a sequence number which represents the message as long a this connection to the POP3 server exists. When the message has been deleted for some reason, C is returned. =item $obj-EB() Returns a list (in list context) or a reference to a list (in scalar context) of all IDs which are known by the server on this moment. =item $obj-EB($id) Returns a reference to an array which contains the lines of the message with the specified C<$id>. Returns C if something has gone wrong. » example: my $ref_lines = $pop3->message($uidl); print @$ref_lines; =item $obj-EB($id) Returns the size of the message which is indicated by the C<$id>, in octets. If the message has been deleted on the remote server, this will return C. =item $obj-EB() Returns (in scalar context only) the number of messages that are known to exist in the mailbox. =back =head2 Protocol internals The follow methods handle protocol internals, and should not be used by a normal user of this class. =over 4 =item $obj-EB() Establish a new connection to the POP3 server, using username and password. =item $obj-EB($socket, $data) Send C<$data> to the indicated socket and return the first line read from that socket. Logs an error if either writing to or reading from socket failed. This method does B attempt to reconnect or anything: if reading or writing the socket fails, something is very definitely wrong. =item $obj-EB($socket, $command) Sends the indicated C<$command> to the specified socket, and retrieves the response. It returns a reference to an array with all the lines that were reveived after the first C<+OK> line and before the end-of-message delimiter (a single dot on a line). Returns C whenever something has gone wrong. =item $obj-EB() Returns a connection to the POP3 server. If there was no connection yet, it will be created transparently. If the connection with the POP3 server was lost, it will be reconnected and the assures that internal state information (STAT and UIDL) is up-to-date in the object. If the contact to the server was still present, or could be established, an IO::Socket::INET object is returned. Else, C is returned and no further actions should be tried on the object. =item $obj-EB($socket) Update the current status of folder on the remote POP3 server. =back =head2 Server connection Extends L<"Server connection" in Mail::Transport::Receive|Mail::Transport::Receive/"Server connection">. =over 4 =item $obj-EB( $name, [@directories] ) Inherited, see L =item $obj-EB() Inherited, see L =item $obj-EB() Inherited, see L =item $obj-EB() Represent this pop3 connection as URL. =back =head2 Error handling Extends L<"Error handling" in Mail::Transport::Receive|Mail::Transport::Receive/"Error handling">. =over 4 =item $obj-EB() Inherited, see L =item $obj-EB() Inherited, see L =back =head2 Cleanup Extends L<"Cleanup" in Mail::Transport::Receive|Mail::Transport::Receive/"Cleanup">. =over 4 =item $obj-EB() Inherited, see L =back =head1 DIAGNOSTICS =over 4 =item Error: POP3 Could not do a STAT For some weird reason, the server does not respond to the STAT call. Cast by C =item Error: POP3 requires a username and password. No username and/or no password specified for this POP3 folder, although these are obligatory parts in the protocol. Cast by C =item Fault: cannot connect to $service for POP3: $! Unsuccessful in connecting to the remote POP3 server. Cast by C =item Error: cannot get all messages of pop3 at once via messages(). It is not possible to retrieve all messages on a remote POP3 folder at once: each shall be taken separately. The POP3 folder will hide this for you. Cast by C =item Error: cannot re-connect reliably to server which doesn't support UIDL. The connection to the remote POP3 was lost, and cannot be re-established because the server's protocol implementation lacks the necessary information. Cast by C =item Fault: cannot read POP3 from socket: $! It is not possible to read the success status of the previously given POP3 command. Connection lost? Cast by C =item Error: cannot write POP3 to socket: $@ It is not possible to send a protocol command to the POP3 server. Connection lost? Cast by C =item Error: class $package does not implement method $method. Fatal error: the specific C<$package> (or one of its superclasses) does not implement this method where it should. This message means that some other related classes do implement this method however the class at hand does not. Probably you should investigate this and probably inform the author of the package. Cast by C =item Error: could not authenticate using '$type' method. The authenication method to get access to the POP3 server did not result in a connection. Maybe you need a different authentication protocol, or your username with password are invalid. Cast by C =item Error: could not authenticate using any login method. No authentication method was explicitly prescribed, so both AUTH and APOP were tried. However, both failed. There are other authentication methods, which are not defined by the main POP3 RFC rfc1939. These protocols are not implemented yet. Please contribute your implementation. Cast by C =item Error: server at $service does not seem to be talking POP3. The remote server did not respond to an initial exchange of messages as is expected by the POP3 protocol. The server has probably a different service on the specified port. Cast by C =back =head1 SEE ALSO This module is part of Mail-Box-POP3 version 4.02, built on April 10, 2026. Website: F =head1 LICENSE For contributors see file ChangeLog. This software is copyright (c) 2001-2026 by Mark Overmeer. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. Mail-Box-POP3-4.02/lib/Mail/Transport/POP3.pm0000644000175000001440000002254615166137306021030 0ustar00markovusers00000000000000# This code is part of Perl distribution Mail-Box-POP3 version 4.02. # The POD got stripped from this file by OODoc version 3.06. # For contributors see file ChangeLog. # This software is copyright (c) 2001-2026 by Mark Overmeer. # This is free software; you can redistribute it and/or modify it under # the same terms as the Perl 5 programming language system itself. # SPDX-License-Identifier: Artistic-1.0-Perl OR GPL-1.0-or-later package Mail::Transport::POP3;{ our $VERSION = '4.02'; } use parent 'Mail::Transport::Receive'; use strict; use warnings; use Log::Report 'mail-box-pop3', import => [ qw/error fault __x/ ]; use IO::Socket (); use IO::Socket::IP (); use IO::Socket::SSL qw/SSL_VERIFY_NONE/; use Socket qw/$CRLF/; use Digest::MD5 qw/md5_hex/; use MIME::Base64 qw/encode_base64/; #-------------------- sub _OK($) { substr(shift // '', 0, 3) eq '+OK' } sub init($) { my ($self, $args) = @_; $args->{via} = 'pop3'; $args->{port} ||= 110; $self->SUPER::init($args) or return; $self->{MTP_auth} = $args->{authenticate} || 'AUTO'; $self->{MTP_ssl} = $args->{use_ssl}; my $opts = $self->{MTP_ssl_opts} = $args->{ssl_options} || {}; $opts->{verify_hostname} ||= 0; $opts->{SSL_verify_mode} ||= SSL_VERIFY_NONE; $self->socket or return; # establish connection $self; } #-------------------- sub useSSL() { $_[0]->{MTP_ssl} } sub SSLOptions() { $_[0]->{MTP_ssl_opts} } sub supportsUIDL() { ! exists $_[0]->{MTP_nouidl} } #-------------------- sub ids(;@) { my $self = shift; $self->socket or return; wantarray ? @{$self->{MTP_n2uidl}} : $self->{MTP_n2uidl}; } sub messages() { my $self = shift; ! wantarray or error __x"cannot get all messages of pop3 at once via messages()."; $self->{MTP_messages}; } sub folderSize() { $_[0]->{MTP_folder_size} } sub header($;$) { my ($self, $uidl, $bodylines) = @_; $uidl or return; $bodylines //= 0;; my $socket = $self->socket or return; my $n = $self->id2n($uidl) or return; $self->sendList($socket, "TOP $n $bodylines$CRLF"); } sub message($;$) { my ($self, $uidl) = @_; $uidl or return; my $socket = $self->socket or return; my $n = $self->id2n($uidl) or return; my $message = $self->sendList($socket, "RETR $n$CRLF") or return; # Some POP3 servers add a trailing empty line pop @$message if @$message && $message->[-1] =~ m/^[\012\015]*$/; $self->{MTP_fetched}{$uidl} = undef # mark this ID as fetched if $self->supportsUIDL; $message; } sub messageSize($) { my ($self, $uidl) = @_; $uidl or return; my $list; unless($list = $self->{MTP_n2length}) { my $socket = $self->socket or return; my $raw = $self->sendList($socket, "LIST$CRLF") or return; my @n2length; foreach (@$raw) { m#^(\d+) (\d+)#; $n2length[$1] = $2; } $self->{MTP_n2length} = $list = \@n2length; } my $n = $self->id2n($uidl) or return; $list->[$n]; } sub deleted($@) { my $dele = shift->{MTP_dele} ||= {}; (shift) ? @$dele{ @_ } = () : delete @$dele{ @_ }; } sub deleteFetched() { my $self = shift; $self->deleted(1, keys %{$self->{MTP_fetched}}); } sub disconnect() { my $self = shift; my $quit; if($self->{MTP_socket}) # can only disconnect once { if(my $socket = $self->socket) { my $dele = $self->{MTP_dele} || {}; while(my $uidl = each %$dele) { my $n = $self->id2n($uidl) or next; $self->send($socket, "DELE $n$CRLF") or last; } $quit = $self->send($socket, "QUIT$CRLF"); close $socket; } } delete @$self{ qw(MTP_socket MTP_dele MTP_uidl2n MTP_n2uidl MTP_n2length MTP_fetched) }; _OK $quit; } sub fetched(;$) { my $self = shift; $self->supportsUIDL ? $self->{MTP_fetched} : undef; } sub id2n($$) { $_[0]->{MTP_uidl2n}{$_[1]} } #-------------------- sub socket() { my $self = shift; # Do we (still) have a working connection which accepts commands? my $socket = $self->_connection; return $socket if defined $socket; $self->supportsUIDL or error __x"can not re-connect reliably to server which doesn't support UIDL."; # (Re-)establish the connection $socket = $self->login or return; $self->status($socket) or return; $self->{MTP_socket} = $socket; } sub send($$) { my $self = shift; my $socket = shift; my $response; if(eval { print $socket @_} ) { $response = <$socket>; defined $response or fault __x"cannot read POP3 from socket"; } else { error __x"cannot write POP3 to socket: {error}", error => $@; } $response; } sub sendList($$) { my ($self, $socket) = (shift, shift); my $response = $self->send($socket, @_); $response && _OK $response or return; my @list; while(my $line = <$socket>) { last if $line =~ m#^\.\r?\n#s; $line =~ s#^\.##; push @list, $line; } \@list; } sub DESTROY() { my $self = shift; $self->SUPER::DESTROY; $self->disconnect if $self->{MTP_socket}; # only when open } sub _connection() { my $self = shift; my $socket = $self->{MTP_socket} // return; # Check if we (still) got a connection eval { print $socket "NOOP$CRLF" }; if($@ || ! <$socket> ) { delete $self->{MTP_socket}; return undef; } $socket; } sub login(;$) { my $self = shift; # Check if we can make a connection my ($host, $port, $username, $password) = $self->remoteHost; $username && $password or error __x"POP3 requires a username and password."; my $socket; if($self->useSSL) { my $opts = $self->SSLOptions; $socket = eval { IO::Socket::SSL->new(PeerAddr => "$host:$port", %$opts) }; } else { $socket = eval { IO::Socket::IP->new("$host:$port") }; } $socket or fault __x"cannot connect to {service} for POP3", service => "$host:$port"; # Check if it looks like a POP server my $connected; my $authenticate = $self->{MTP_auth}; my $welcome = <$socket>; _OK $welcome or error __x"server at {service} does not seem to be talking POP3.", service => "$host:$port"; # Check APOP login if automatic or APOP specifically requested if($authenticate eq 'AUTO' || $authenticate eq 'APOP') { if($welcome =~ m#^\+OK .*(<\d+\.\d+\@[^>]+>)#) { my $md5 = md5_hex $1.$password; my $response = $self->send($socket, "APOP $username $md5$CRLF"); $connected = _OK $response; } } # Check USER/PASS login if automatic and failed or LOGIN specifically # requested. unless($connected) { if($authenticate eq 'AUTO' || $authenticate eq 'LOGIN') { my $response = $self->send($socket, "USER $username$CRLF") or return; if(_OK $response) { my $response2 = $self->send($socket, "PASS $password$CRLF") or return; $connected = _OK $response2; } } } # Try OAUTH2 login if(! $connected && $authenticate =~ /^OAUTH2/) { # Borrowed from Net::POP3::XOAuth2 0.0.2 by Kizashi Nagata (also Perl license) my $token = encode_base64 "user=$username\001auth=Bearer $password\001\001"; $token =~ s/[\r\n]//g; # no base64 newlines, anywhere if($authenticate eq 'OAUTH2_SEP') { # Microsofts way # https://learn.microsoft.com/en-us/exchange/client-developer/legacy-protocols/how-to-authenticate-an-imap-pop-smtp-application-by-using-oauth my $response = $self->send($socket, "AUTH XOAUTH2$CRLF") or return; if($response =~ /^\+/) # Office365 sends + here, not +OK { my $response2 = $self->send($socket, "$token$CRLF") or return; $connected = _OK $response2; } } else { my $response = $self->send($socket, "AUTH XOAUTH2 $token$CRLF") or return; $connected = _OK $response; } } # If we're still not connected now, we have an error unless($connected) { $authenticate eq 'AUTO' ? (error __x"could not authenticate using any login method.") : (error __x"could not authenticate using '{type}' method", type => $authenticate); } $socket; } sub status($;$) { my ($self, $socket) = @_; # Check if we can do a STAT my $stat = $self->send($socket, "STAT$CRLF") or return; if($stat !~ m#^\+OK (\d+) (\d+)#) { delete $self->{MTP_messages}; delete $self->{MTP_size}; error __x"POP3 Could not do a STAT"; return; } $self->{MTP_messages} = my $nr_msgs = $1; $self->{MTP_folder_size} = $2; # Check if we can do a UIDL my $uidl = $self->send($socket, "UIDL$CRLF") or return; $self->{MTP_nouidl} = undef; delete $self->{MTP_uidl2n}; # drop the reverse lookup: UIDL -> number if(_OK $uidl) { my @n2uidl; $n2uidl[$nr_msgs] = undef; # pre-alloc while(my $line = <$socket>) { last if substr($line, 0, 1) eq '.'; $line =~ m#^(\d+) (.+?)\r?\n# or next; $n2uidl[$1] = $2; } shift @n2uidl; # make message 1 into index 0 $self->{MTP_n2uidl} = \@n2uidl; delete $self->{MTP_n2length}; delete $self->{MTP_nouidl}; } else { # We can't do UIDL, we need to fake it my $list = $self->send($socket, "LIST$CRLF") or return; my (@n2length, @n2uidl); if(_OK $list) { $n2length[$nr_msgs] = $n2uidl[$nr_msgs] = undef; # alloc all my ($host, $port) = $self->remoteHost; while(my $line = <$socket>) { last if substr($line, 0, 1) eq '.'; $line =~ m#^(\d+) (\d+)# or next; $n2length[$1] = $2; $n2uidl[$1] = "$host:$port:$1"; # fake UIDL, for id only } shift @n2length; shift @n2uidl; # make 1st message in index 0 } $self->{MTP_n2length} = \@n2length; $self->{MTP_n2uidl} = \@n2uidl; } my $i = 1; my %uidl2n = map +($_ => $i++), @{$self->{MTP_n2uidl}}; $self->{MTP_uidl2n} = \%uidl2n; 1; } #-------------------- sub url(;$) { my $self = shift; my ($host, $port, $user, $pwd) = $self->remoteHost; my $proto = $self->useSSL ? 'pop3s' : 'pop3'; "$proto://$user:$pwd\@$host:$port"; } #-------------------- 1; Mail-Box-POP3-4.02/lib/Mail/Box/0000755000175000001440000000000015166137310016467 5ustar00markovusers00000000000000Mail-Box-POP3-4.02/lib/Mail/Box/POP3.pod0000644000175000001440000004546515166137306017737 0ustar00markovusers00000000000000=encoding utf8 =head1 NAME Mail::Box::POP3 - handle POP3 folders as client =head1 INHERITANCE Mail::Box::POP3 is a Mail::Box::Net is a Mail::Box is a Mail::Reporter Mail::Box::POP3 is extended by Mail::Box::POP3s =head1 SYNOPSIS use Mail::Box::POP3; my $folder = Mail::Box::POP3->new(folder => $ENV{MAIL}, ...); =head1 DESCRIPTION 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 POP3 protocol. This class uses L to hide the transport of information, and focusses solely on the correct handling of messages within a POP3 folder. B This module versions 4.0 and up is not fully compatible with older releases: mainly the exception handling has changed. When you need to upgrade, please read F B and may see new releases as well. Extends L<"DESCRIPTION" in Mail::Box::Net|Mail::Box::Net/"DESCRIPTION">. =head1 OVERLOADED Extends L<"OVERLOADED" in Mail::Box::Net|Mail::Box::Net/"OVERLOADED">. =over 4 =item overload: B<'""'> stringification Inherited, see L =item overload: B<'@{}'> use as ARRAY Inherited, see L =item overload: B string comparison Inherited, see L =back =head1 METHODS Extends L<"METHODS" in Mail::Box::Net|Mail::Box::Net/"METHODS">. =head2 Constructors Extends L<"Constructors" in Mail::Box::Net|Mail::Box::Net/"Constructors">. =over 4 =item $class-EB(%options) For authentications, you have three choices: specify a foldername which resembles an URL, or specify a pop-client object, or separate options for user, password, pop-server and server-port. Improves base, see L -Option --Defined in --Default access Mail::Box 'r' authenticate 'AUTO' body_delayed_type Mail::Box Mail::Message::Body::Delayed body_type Mail::Box Mail::Message::Body::Lines coerce_options Mail::Box +[] create Mail::Box extract Mail::Box 10240 field_type Mail::Box undef fix_headers Mail::Box false folder Mail::Box folderdir Mail::Box head_delayed_type Mail::Box Mail::Message::Head::Delayed head_type Mail::Box Mail::Message::Head::Complete keep_dups Mail::Box false lock_file Mail::Box undef lock_timeout Mail::Box 1 hour lock_type Mail::Box 'NONE' lock_wait Mail::Box 10 seconds locker Mail::Box undef manager Mail::Box undef message_type Mail::Box Mail::Box::POP3::Message multipart_type Mail::Box Mail::Message::Body::Multipart password Mail::Box::Net undef pop_client undef remove_when_empty Mail::Box save_on_exit Mail::Box true server_name Mail::Box::Net undef server_port Mail::Box::Net 110 ssl_options undef trusted Mail::Box use_ssl false username Mail::Box::Net undef =over 2 =item access => $mode =item authenticate => 'LOGIN'|'APOP'|'AUTO'|'OUATH2'|'OAUTH2_SEP' POP3 can use two methods of authentication: the old LOGIN protocol, which transmits a username and password in plain text, and the newer APOP protocol which uses MD5 encryption. APOP is therefore much better, however not always supported by the server. With AUTO, first APOP is tried and if that fails LOGIN. OAUTH* requires the authorization token to be passed as Password. Microsoft Office365 needs C, where other oauth2 implementations use C. =item body_delayed_type => CLASS =item body_type => CLASS|CODE =item coerce_options => ARRAY =item create => BOOLEAN =item extract => INTEGER|CODE|METHOD|'LAZY'|'ALWAYS' =item field_type => $class =item fix_headers => BOOLEAN =item folder => $name =item folderdir => $directory =item head_delayed_type => $class =item head_type => $class =item keep_dups => BOOLEAN =item lock_file => $file =item lock_timeout => $seconds =item lock_type => $class|$name|\@names =item lock_wait => $seconds =item locker => $locker =item manager => $manager =item message_type => $class =item multipart_type => CLASS =item password => $password =item pop_client => OBJECT You may want to specify your own pop-client object. The object which is passed must extend L. =item remove_when_empty => BOOLEAN =item save_on_exit => BOOLEAN =item server_name => $host =item server_port => $number =item ssl_options => HASH =item trusted => BOOLEAN =item use_ssl => BOOLEAN =item username => $username =back » example: my $url = 'pop3://user:password@pop.xs4all.nl' my $pop = Mail::Box::POP3->new($url); my $pop = $mgr->open(type => 'pop3', username => 'myname', password => 'mypassword', server_name => 'pop.xs4all.nl' ); =back =head2 Attributes Extends L<"Attributes" in Mail::Box::Net|Mail::Box::Net/"Attributes">. =over 4 =item $obj-EB() Inherited, see L =item $obj-EB( [$directory] ) Inherited, see L =item $obj-EB() Inherited, see L =item $obj-EB() Inherited, see L =item $obj-EB() Inherited, see L =item $obj-EB() Inherited, see L =back =head2 The folder Extends L<"The folder" in Mail::Box::Net|Mail::Box::Net/"The folder">. =over 4 =item $obj-EB($message) It is impossible to write messages to the average POP3 server. There are extensions to the protocol which do permit it, however these are not implemented (yet, patches welcome). C is returned, and an error displayed. However, no complaint is given when the C<$message> is C itself. Improves base, see L -Option--Defined in--Default share Mail::Box =over 2 =item share => BOOLEAN =back =item $obj-EB($messages) As useless as L. The only acceptable call to this method is without any message. Improves base, see L =item $class-EB(%options) Inherited, see L =item $obj-EB(%options) Inherited, see L =item $obj-EB($folder, %options) Inherited, see L =item $obj-EB(%options) It is not possible to delete a POP3 folder remotely: the best we can do is remove all the messages in it... which is the action implemented here. A notice is logged about this. Improves base, see L -Option --Defined in--Default recursive Mail::Box =over 2 =item recursive => BOOLEAN =back =item $obj-EB() Inherited, see L =item $obj-EB() Inherited, see L =item $obj-EB() NOT IMPLEMENTED YET Improves base, see L =item $obj-EB() Inherited, see L =back =head2 Folder flags Extends L<"Folder flags" in Mail::Box::Net|Mail::Box::Net/"Folder flags">. =over 4 =item $obj-EB() Inherited, see L =item $obj-EB() Inherited, see L =item $obj-EB( [BOOLEAN] ) Inherited, see L =item $obj-EB() Inherited, see L =back =head2 The messages Extends L<"The messages" in Mail::Box::Net|Mail::Box::Net/"The messages">. =over 4 =item $obj-EB( [$number|$message|$message_id] ) Inherited, see L =item $obj-EB($message_id) Inherited, see L =item $obj-EB( $label, [BOOLEAN, [\@msgs]] ) Inherited, see L =item $obj-EB( $index, [$message] ) Inherited, see L =item $obj-EB( $message_id, [$message] ) Inherited, see L =item $obj-EB() Inherited, see L =item $obj-EB( <'ALL'|$range|'ACTIVE'|'DELETED'|$label| !$label|$filter> ) Inherited, see L =item $obj-EB(%options) Inherited, see L =item $obj-EB($message, $message_ids, $timespan, $window) Inherited, see L =back =head2 Sub-folders Extends L<"Sub-folders" in Mail::Box::Net|Mail::Box::Net/"Sub-folders">. =over 4 =item $any-EB(%options) The standard POP3 protocol does not support sub-folders, so an empty list will be returned in any case. Improves base, see L -Option --Defined in --Default check Mail::Box false folder Mail::Box folderdir Mail::Box skip_empty Mail::Box false =over 2 =item check => BOOLEAN =item folder => $name =item folderdir => $dir =item skip_empty => BOOL =back =item $any-EB( $subname, [$parentname] ) Inherited, see L =item $obj-EB(%options) Inherited, see L =item $obj-EB(%options) It is not possible to open a sub-folder for a POP3 folder, because that is not supported by the official POP3 protocol. In any case, C is returned to indicate a failure. Improves base, see L =item $any-EB() Inherited, see L =back =head2 Internals Extends L<"Internals" in Mail::Box::Net|Mail::Box::Net/"Internals">. =over 4 =item $obj-EB($message, %options) Inherited, see L =item $any-EB($folder, %options) It is not possible to create a new folder on a POP3 server. This method will always return C. Improves base, see L -Option --Defined in--Default folderdir Mail::Box undef =over 2 =item folderdir => $directory =back =item $obj-EB($message, $head) Inherited, see L =item $class-EB( [$foldername], %options ) Inherited, see L =item $obj-EB($message) Read the header for the specified message from the remote server. =item $obj-EB($message) Read all data for the specified message from the remote server. =item $obj-EB( [] ) Inherited, see L =item $obj-EB() Inherited, see L =item $obj-EB(%options) Returns the pop client object. This does not establish the connection. -Option --Default ssl_options use_ssl =over 2 =item ssl_options => HASH =item use_ssl => BOOLEAN =back =item $obj-EB(%options) Inherited, see L =item $obj-EB(%options) Inherited, see L =item $obj-EB($message) Inherited, see L =item $obj-EB($messages) Inherited, see L =item $obj-EB($messages) Inherited, see L =item $obj-EB(%options) Inherited, see L =item $obj-EB(%options) Inherited, see L =item $obj-EB(%options) Inherited, see L -Option --Defined in--Default messages Mail::Box =over 2 =item messages => ARRAY =back =back =head2 Other methods Extends L<"Other methods" in Mail::Box::Net|Mail::Box::Net/"Other methods">. =over 4 =item $any-EB($time) Inherited, see L =back =head2 Error handling Extends L<"Error handling" in Mail::Box::Net|Mail::Box::Net/"Error handling">. =over 4 =item $obj-EB() Inherited, see L =item $obj-EB() Inherited, see L =back =head2 Cleanup Extends L<"Cleanup" in Mail::Box::Net|Mail::Box::Net/"Cleanup">. =over 4 =item $obj-EB() Inherited, see L =back =head1 DETAILS Extends L<"DETAILS" in Mail::Box::Net|Mail::Box::Net/"DETAILS">. =head2 Different kinds of folders Extends L<"Different kinds of folders" in Mail::Box::Net|Mail::Box::Net/"Different kinds of folders">. =head2 Available folder types Extends L<"Available folder types" in Mail::Box::Net|Mail::Box::Net/"Available folder types">. =head2 Folder class implementation Extends L<"Folder class implementation" in Mail::Box::Net|Mail::Box::Net/"Folder class implementation">. =head2 How POP3 folders work Rfc1939 defines how POP3 works. POP3 is a really simple protocol to receive messages from a server to a user's client. POP3 is also really limited: it can only be used to fetch messages, but has not many ways to limit the amount of network traffic, like the IMAP4 protocol has. One POP3 account represents only one folder: there is no way of sub-folders in POP3. POP3 doesn't support writing (except for some message status flags). =head2 This implementation The protocol specifics are implemented in L, written by Liz Mattijsen. That module does not use any of the other POP3 modules available on CPAN for the reason that MailBox tries to be smarter: it is capable of re-establishing broken POP3 connection when the server supports UIDs. The implementation has shown to work with many different POP servers. In the test directory of the distribution, you will find a small server implementation, which is used to test the client. =head1 DIAGNOSTICS =over 4 =item Error: Cannot find head back for $id on POP3 server $name. The server told to have this message, but when asked for its headers, no single line was returned. Did the message get destroyed? Cast by C =item Error: Cannot read body for $id on POP3 server $name. The message's headers are retrieved from the server, but the body seems to be lost. Did the message get destroyed between reading the header and reading the body? Cast by C =item Error: Folder $name is opened read-only You can not write to this folder unless you have opened the folder to write or append with L, or the C option is set C. Cast by C =item Warning: Message $id on POP3 server $name disappeared. The server indicated the existence of this message before, however it has no information about the message anymore. Cast by C =item Warning: POP3 folders cannot be deleted. Each user has only one POP3 folder on a server. This folder is created and deleted by the server's administrator only. Cast by C =item Error: cannot create POP3 client for $name. The connection to the POP3 server cannot be established. You may see more, related, error messages about the failure. Cast by C =item Warning: changes not written to read-only folder $name. You have opened the folder read-only --which is the default set by L--, made modifications, and now want to close it. Set L if you want to overrule the access mode, or close the folder with L set to C. Cast by C =item Error: class $package does not implement method $method. Fatal error: the specific C<$package> (or one of its superclasses) does not implement this method where it should. This message means that some other related classes do implement this method however the class at hand does not. Probably you should investigate this and probably inform the author of the package. Cast by C =item Error: copying failed for one message. For some reason, for instance disk full, removed by external process, or read-protection, it is impossible to copy one of the messages. Copying will proceed for the other messages. Cast by C =item Error: destination folder $name is not writable. The folder where the messages are copied to is not opened with write access (see L). This has no relation with write permission to the folder which is controlled by your operating system. Cast by C =item Warning: different messages with id $msgid. The message id is discovered more than once within the same folder, but the content of the message seems to be different. This should not be possible: each message must be unique. Cast by C =item Error: invalid timespan '$span'. The string does not follow the strict rules of the time span syntax which is permitted as parameter. Cast by C =item Warning: message $id disappeared from POP3 server $name. Cast by C =item Warning: message-id '$msgid' does not contain a domain. According to the RFCs, message-ids need to contain a unique random part, then an C<@>, and then a domain name. This is made to avoid the creation of two messages with the same id. The warning emerges when the C<@> is missing from the string. Cast by C =item Error: unknown value to folder->close(write => $when). Cast by C =item Warning: update of $count messages ignored for POP3 folder $name. The standard POP3 implementation does not support writing from client back to the server. Therefore, modifications may be lost. Cast by C =item Error: you cannot write a message to a pop server (yet) Some extensions to the POP3 protocol do permit writing messages to the server, but the standard protocol only implements retreival. Feel invited to extend our implementation with writing. Cast by C =item Error: you cannot write messages to a pop server (yet) Cast by C =back =head1 SEE ALSO This module is part of Mail-Box-POP3 version 4.02, built on April 10, 2026. Website: F =head1 LICENSE For contributors see file ChangeLog. This software is copyright (c) 2001-2026 by Mark Overmeer. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. Mail-Box-POP3-4.02/lib/Mail/Box/POP3.pm0000644000175000001440000001202415166137306017552 0ustar00markovusers00000000000000# This code is part of Perl distribution Mail-Box-POP3 version 4.02. # The POD got stripped from this file by OODoc version 3.06. # For contributors see file ChangeLog. # This software is copyright (c) 2001-2026 by Mark Overmeer. # This is free software; you can redistribute it and/or modify it under # the same terms as the Perl 5 programming language system itself. # SPDX-License-Identifier: Artistic-1.0-Perl OR GPL-1.0-or-later package Mail::Box::POP3;{ our $VERSION = '4.02'; } use parent 'Mail::Box::Net'; use strict; use warnings; use Log::Report 'mail-box-pop3', import => [ qw/__x error trace warning/ ]; use Mail::Box::POP3::Message (); use Mail::Box::Parser::Perl (); use Mail::Box::FastScalar (); #-------------------- sub init($) { my ($self, $args) = @_; $args->{server_port} ||= 110; $args->{folder} ||= 'inbox'; $args->{message_type} ||= 'Mail::Box::POP3::Message'; $self->SUPER::init($args); $self->{MBP_client} = $args->{pop_client}; $self->{MBP_auth} = $args->{authenticate} || 'AUTO'; $self->{MBP_use_ssl} = $args->{use_ssl} || 0; $self->{MBP_ssl_opts} = $args->{ssl_options}; $self; } sub create($@) { undef } # fails sub foundIn(@) { my $self = shift; unshift @_, 'folder' if @_ % 2; my %args = @_; (exists $args{type} && lc $args{type} eq 'pop3') || (exists $args{folder} && $args{folder} =~ m/^pop/); } sub addMessage($) { my ($self, $message) = @_; error __x"you cannot write a message to a pop server (yet)" if defined $message; undef; } sub addMessages(@) { my $self = shift; # error message described in addMessage() error __x"you cannot write messages to a pop server (yet)" if @_; (); } sub type() {'pop3'} sub close(@) { my $self = shift; $self->SUPER::close(@_); my $pop = delete $self->{MBP_client}; $pop->disconnect if defined $pop; $self; } sub delete(@) { my $self = shift; warning __x"POP3 folders cannot be deleted."; undef; } sub listSubFolders(@) { () } # no sub openSubFolder($@) { undef } # fails sub topFolderWithMessages() { 1 } # Yes: only top folder sub update() { $_[0]->notImplemented } #-------------------- sub popClient(%) { my ($self, %args) = @_; return $self->{MBP_client} if defined $self->{MBP_client}; my $auth = $self->{auth}; require Mail::Transport::POP3; my $client = Mail::Transport::POP3->new( username => $self->{MBN_username}, password => $self->{MBN_password}, hostname => $self->{MBN_hostname}, port => $self->{MBN_port}, authenticate => $self->{MBP_auth}, use_ssl => $args{use_ssl} || $self->{MBP_use_ssl}, ssl_options => $args{ssl_options} || $self->{MBP_ssl_opts} ) or error __x"cannot create POP3 client for {name}.", name => $self->name; $self->{MBP_client} = $client; } sub readMessages(@) { my ($self, %args) = @_; my $pop = $self->popClient or return; my $seqnr = 0; foreach my $id ($pop->ids) { my $message = $args{message_type}->new( head => $args{head_delayed_type}->new, unique => $id, folder => $self, seqnr => $seqnr++ ); my $body = $args{body_delayed_type}->new(message => $message); $message->storeBody($body); $self->storeMessage($message); } $self; } sub getHead($) { my ($self, $message) = @_; my $pop = $self->popClient or return; my $uidl = $message->unique; my $lines = $pop->header($uidl); unless(defined $lines) { $lines = []; warning __x"message {id} disappeared from POP3 server {name}.", id => $uidl, name => $self->name; } my $text = join '', @$lines; my $parser = Mail::Box::Parser::Perl->new( # not parseable by C parser filename => "$pop", file => Mail::Box::FastScalar->new(\$text), fix_headers => $self->{MB_fix_headers} ); $self->lazyPermitted(1); my $head = $message->readHead($parser); $parser->stop; $self->lazyPermitted(0); trace "Loaded head of $uidl."; $head; } sub getHeadAndBody($) { my ($self, $message) = @_; my $pop = $self->popClient or return; my $uidl = $message->unique; my $lines = $pop->message($uidl); unless(defined $lines) { $lines = []; warning __x"message {id} disappeared from POP3 server {name}.", id => $uidl, name => $self->name; } my $parser = Mail::Box::Parser::Perl->new( # not parseable by C parser filename => "$pop", file => IO::ScalarArray->new($lines) ); my $head = $message->readHead($parser); unless(defined $head) { error __x"cannot find head back for {id} on POP3 server {name}.", id => $uidl, name => $self->name; $parser->stop; return undef; } my $body = $message->readBody($parser, $head); unless(defined $body) { error __x"cannot read body for {id} on POP3 server {name}.", id => $uidl, name => $self->name; $parser->stop; return undef; } $parser->stop; trace "Loaded message $uidl."; ($head, $body); } sub writeMessages($@) { my ($self, $args) = @_; if(my $modifications = grep $_->isModified, @{$args->{messages}}) { warning __x"update of {count} messages ignored for POP3 folder {name}.", count => $modifications, name => $self->name; } $self; } #-------------------- 1; Mail-Box-POP3-4.02/lib/Mail/Box/POP3/0000755000175000001440000000000015166137310017210 5ustar00markovusers00000000000000Mail-Box-POP3-4.02/lib/Mail/Box/POP3/Test.pm0000644000175000001440000000333515166137306020476 0ustar00markovusers00000000000000# This code is part of Perl distribution Mail-Box-POP3 version 4.02. # The POD got stripped from this file by OODoc version 3.06. # For contributors see file ChangeLog. # This software is copyright (c) 2001-2026 by Mark Overmeer. # This is free software; you can redistribute it and/or modify it under # the same terms as the Perl 5 programming language system itself. # SPDX-License-Identifier: Artistic-1.0-Perl OR GPL-1.0-or-later package Mail::Box::POP3::Test;{ our $VERSION = '4.02'; } use parent 'Exporter'; use strict; use warnings; use Log::Report 'mail-box-pop3'; use List::Util qw/first/; use File::Spec (); use Mail::Transport::POP3 (); our @EXPORT = qw/start_pop3_server start_pop3_client/; # # Start POP3 server for tests # sub start_pop3_server($;$) { my $popbox = shift; my $setting = shift || ''; my $serverscript = File::Spec->catfile('t', 'server'); # Some complications to find-out $perl, which must be absolute and # untainted for perl5.6.1, but not for the other Perl's. my $perl = $^X; unless(File::Spec->file_name_is_absolute($perl)) { my @path = split /\:|\;/, $ENV{PATH}; $perl = first { -x $_ } map File::Spec->catfile($_, $^X), @path; } $perl =~ m/(.*)/; $perl = $1; %ENV = (); open my $server, "$perl $serverscript $popbox $setting |" or fault __x"could not start POP3 test server"; my $line = <$server>; my $port = $line =~ m/(\d+)/ ? $1 : error __x"did not get port specification, but '{text}'.", text => $line; ($server, $port); } # # START_POP3_CLIENT PORT, OPTIONS # sub start_pop3_client($@) { my ($port, @options) = @_; Mail::Transport::POP3->new( hostname => '127.0.0.1', port => $port, username => 'user', password => 'password', @options, ); } 1; Mail-Box-POP3-4.02/lib/Mail/Box/POP3/Message.pod0000644000175000001440000003647415166137306021323 0ustar00markovusers00000000000000=encoding utf8 =head1 NAME Mail::Box::POP3::Message - one message on a POP3 server =head1 INHERITANCE Mail::Box::POP3::Message is a Mail::Box::Net::Message is a Mail::Box::Message is a Mail::Message is a Mail::Reporter =head1 SYNOPSIS my $folder = new Mail::Box::POP3 ... my $message = $folder->message(10); =head1 DESCRIPTION A C represents one message on a POP3 server, maintained by a L folder. Each message is stored as separate entity on the server, and maybe temporarily in your program as well. Extends L<"DESCRIPTION" in Mail::Box::Net::Message|Mail::Box::Net::Message/"DESCRIPTION">. =head1 METHODS Extends L<"METHODS" in Mail::Box::Net::Message|Mail::Box::Net::Message/"METHODS">. =head2 Constructors Extends L<"Constructors" in Mail::Box::Net::Message|Mail::Box::Net::Message/"Constructors">. =over 4 =item $obj-EB(%options) Inherited, see L =item $class-EB(%options) Inherited, see L -Option --Defined in --Default body Mail::Message undef body_type Mail::Box::Message Mail::Message::Body::Lines deleted Mail::Message false field_type Mail::Message undef folder Mail::Box::Message head Mail::Message undef head_type Mail::Message Mail::Message::Head::Complete labels Mail::Message +{} messageId Mail::Message undef message_id Mail::Message undef modified Mail::Message false size Mail::Box::Message undef trusted Mail::Message false unique Mail::Box::Net::Message =over 2 =item body => $object =item body_type => CODE|$class =item deleted => BOOLEAN =item field_type => $class =item folder => $folder =item head => $object =item head_type => $class =item labels => \@pairs|\%settings =item messageId => $id =item message_id => $id =item modified => BOOLEAN =item size => $bytes =item trusted => BOOLEAN =item unique => STRING =back =back =head2 Attributes Extends L<"Attributes" in Mail::Box::Net::Message|Mail::Box::Net::Message/"Attributes">. =over 4 =item $obj-EB() Inherited, see L =item $obj-EB() Inherited, see L =item $obj-EB( [$folder] ) Inherited, see L =item $obj-EB() Inherited, see L =item $obj-EB() Inherited, see L =item $obj-EB( [$integer] ) Inherited, see L =item $obj-EB( [STRING|undef] ) Inherited, see L =back =head2 Constructing a message Extends L<"Constructing a message" in Mail::Box::Net::Message|Mail::Box::Net::Message/"Constructing a message">. =over 4 =item $obj-EB( [<$rg_object|%options>] ) Inherited, see L =item $class-EB( [$message|$part|$body], @fields, %options ) Inherited, see L =item $class-EB($body, [$head], $headers) Inherited, see L =item $obj-EB(%options) Inherited, see L =item $obj-EB(%options) Inherited, see L =item $obj-EB(%options) Inherited, see L =item $obj-EB(%options) Inherited, see L =item $obj-EB(%options) Inherited, see L =item $obj-EB() Inherited, see L =item $obj-EB() Inherited, see L =item $obj-EB(STRING) Inherited, see L =item $class-EB($fh|$text|\$text|\@lines, %options) Inherited, see L =item $obj-EB(%options) Inherited, see L =item $obj-EB(%options) Inherited, see L =item $obj-EB( [STRING|$field|$address|\@addrs|\@fields] ) Inherited, see L =item $any-EB(STRING) Inherited, see L =back =head2 The message Extends L<"The message" in Mail::Box::Net::Message|Mail::Box::Net::Message/"The message">. =over 4 =item $obj-EB() Inherited, see L =item $obj-EB($folder, %options) Inherited, see L =item $obj-EB() Inherited, see L =item $obj-EB() Inherited, see L =item $obj-EB() Inherited, see L =item $obj-EB($folder, %options) Inherited, see L =item $obj-EB() Inherited, see L =item $obj-EB( [$fh] ) Inherited, see L =item $obj-EB( [$mailer], %options ) Inherited, see L =item $obj-EB() Returns the size of this message. If the message is still on the remote server, POP is used to ask for the size. When the message is already loaded onto the local system, the size of the parsed message is taken. These sizes can differ because the difference in line-ending representation. Improves base, see L =item $obj-EB() Inherited, see L =item $obj-EB( [$fh] ) Inherited, see L =back =head2 The header Extends L<"The header" in Mail::Box::Net::Message|Mail::Box::Net::Message/"The header">. =over 4 =item $obj-EB() Inherited, see L =item $obj-EB() Inherited, see L =item $obj-EB() Inherited, see L =item $obj-EB() Inherited, see L =item $obj-EB() Inherited, see L =item $obj-EB($fieldname) Inherited, see L =item $obj-EB() Inherited, see L =item $obj-EB( [$head] ) Inherited, see L =item $obj-EB() Inherited, see L =item $obj-EB() Inherited, see L =item $obj-EB($fieldname) Inherited, see L =item $obj-EB() Inherited, see L =item $obj-EB() Inherited, see L =item $obj-EB() Inherited, see L =back =head2 The body Extends L<"The body" in Mail::Box::Net::Message|Mail::Box::Net::Message/"The body">. =over 4 =item $obj-EB( [$body] ) Inherited, see L =item $obj-EB() Inherited, see L =item $obj-EB(%options) Inherited, see L =item $obj-EB(%options) Inherited, see L =item $obj-EB() Inherited, see L =item $obj-EB() Inherited, see L =item $obj-EB( [<'ALL'|'ACTIVE'|'DELETED'|'RECURSE'|$filter>] ) Inherited, see L =back =head2 Flags Extends L<"Flags" in Mail::Box::Net::Message|Mail::Box::Net::Message/"Flags">. =over 4 =item $obj-EB() Inherited, see L =item $obj-EB( [BOOLEAN] ) Inherited, see L =item $obj-EB() Inherited, see L =item $obj-EB() Inherited, see L =item $obj-EB