Mail-Box-IMAP4-3.002/0000755000175000001440000000000013125177642014464 5ustar00markovusers00000000000000Mail-Box-IMAP4-3.002/lib/0000755000175000001440000000000013125177642015232 5ustar00markovusers00000000000000Mail-Box-IMAP4-3.002/lib/Mail/0000755000175000001440000000000013125177642016114 5ustar00markovusers00000000000000Mail-Box-IMAP4-3.002/lib/Mail/Server/0000755000175000001440000000000013125177642017362 5ustar00markovusers00000000000000Mail-Box-IMAP4-3.002/lib/Mail/Server/IMAP4/0000755000175000001440000000000013125177642020174 5ustar00markovusers00000000000000Mail-Box-IMAP4-3.002/lib/Mail/Server/IMAP4/Search.pod0000644000175000001440000001274113125177641022111 0ustar00markovusers00000000000000=encoding utf8 =head1 NAME Mail::Server::IMAP4::Search - select messages within a IMAP folder (not completed) =head1 INHERITANCE Mail::Server::IMAP4::Search is a Mail::Box::Search is a Mail::Reporter =head1 SYNOPSIS use Mail::Box::Manager; my $mgr = Mail::Box::Manager->new; my $folder = $mgr->open('imap4:Inbox'); my $filter = Mail::Server::IMAP4::Search->new ( ...to be defined... ); my @msgs = $filter->search($folder); if($filter->search($message)) {...} =head1 DESCRIPTION THIS PACKAGES IS NOT IMPLEMENTED YET... (it's waiting for a volunteer) Extends L<"DESCRIPTION" in Mail::Box::Search|Mail::Box::Search/"DESCRIPTION">. =head1 METHODS Extends L<"METHODS" in Mail::Box::Search|Mail::Box::Search/"METHODS">. =head2 Constructors Extends L<"Constructors" in Mail::Box::Search|Mail::Box::Search/"Constructors">. =over 4 =item Mail::Server::IMAP4::Search-EB(%options) -Option --Defined in --Default binaries Mail::Box::Search decode Mail::Box::Search delayed Mail::Box::Search deleted Mail::Box::Search deliver Mail::Box::Search undef in Mail::Box::Search 'BODY' label Mail::Box::Search undef limit Mail::Box::Search 0 log Mail::Reporter 'WARNINGS' logical Mail::Box::Search 'REPLACE' multiparts Mail::Box::Search trace Mail::Reporter 'WARNINGS' =over 2 =item binaries => BOOLEAN =item decode => BOOLEAN =item delayed => BOOLEAN =item deleted => BOOLEAN =item deliver => undef|CODE|'DELETE' =item in => 'HEAD'|'BODY'|'MESSAGE' =item label => STRING =item limit => NUMBER =item log => LEVEL =item logical => 'REPLACE'|'AND'|'OR'|'NOT'|'AND NOT'|'OR NOT' =item multiparts => BOOLEAN =item trace => LEVEL =back =back =head2 Searching Extends L<"Searching" in Mail::Box::Search|Mail::Box::Search/"Searching">. =over 4 =item $obj-EB($part, $body) Inherited, see L =item $obj-EB($part, $head) Inherited, see L =item $obj-EB($folder|$thread|$message|ARRAY) Inherited, see L =item $obj-EB($part) Inherited, see L =back =head2 The Results Extends L<"The Results" in Mail::Box::Search|Mail::Box::Search/"The Results">. =over 4 =item $obj-EB( [$fh], HASH ) Inherited, see L =back =head2 Error handling Extends L<"Error handling" in Mail::Box::Search|Mail::Box::Search/"Error handling">. =over 4 =item $obj-EB() Inherited, see L =item $obj-EB($object) Inherited, see L =item $obj-EB( [$level]|[$loglevel, $tracelevel]|[$level, $callback] ) =item Mail::Server::IMAP4::Search-EB( [$level]|[$loglevel, $tracelevel]|[$level, $callback] ) Inherited, see L =item $obj-EB() Inherited, see L =item $obj-EB( [$level, [$strings]] ) =item Mail::Server::IMAP4::Search-EB( [$level, [$strings]] ) Inherited, see L =item $obj-EB($level) =item Mail::Server::IMAP4::Search-EB($level) Inherited, see L =item $obj-EB() Inherited, see L =item $obj-EB() Inherited, see L =item $obj-EB( [$level] ) Inherited, see L =item $obj-EB( [$level] ) Inherited, see L =item $obj-EB( [$level] ) Inherited, see L =item $obj-EB() Inherited, see L =back =head2 Cleanup Extends L<"Cleanup" in Mail::Box::Search|Mail::Box::Search/"Cleanup">. =over 4 =item $obj-EB() Inherited, see L =back =head1 DIAGNOSTICS =over 4 =item Error: Package $package does not implement $method. Fatal error: the specific 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. =back =head1 SEE ALSO This module is part of Mail-Box-IMAP4 distribution version 3.002, built on June 29, 2017. Do not forget to read L, L, and L. Examples are included in the Mail-Box distribution, directories 'examples' and 'scripts'. Browseable manuals, papers, and other released material van be found at Website: F The central modules (in separate distributions) in the MailBox suite are: L, L, L, L, L, L (unpublished), L, L, and L. Please post questions or ideas to the author F. =head1 LICENSE Copyrights 2001-2017 by [Mark Overmeer]. For other contributors see ChangeLog. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See F Mail-Box-IMAP4-3.002/lib/Mail/Server/IMAP4/User.pod0000644000175000001440000003417413125177641021626 0ustar00markovusers00000000000000=encoding utf8 =head1 NAME Mail::Server::IMAP4::User - manage the folders of one user =head1 INHERITANCE Mail::Server::IMAP4::User is a Mail::Box::Manage::User is a Mail::Box::Manager is a Mail::Reporter =head1 SYNOPSIS my $mgr = Mail::Server::IMAP4::User->new(...); =head1 DESCRIPTION This class adds IMAP protocal features to the normal L. Extends L<"DESCRIPTION" in Mail::Box::Manage::User|Mail::Box::Manage::User/"DESCRIPTION">. =head1 METHODS Extends L<"METHODS" in Mail::Box::Manage::User|Mail::Box::Manage::User/"METHODS">. =head2 Constructors Extends L<"Constructors" in Mail::Box::Manage::User|Mail::Box::Manage::User/"Constructors">. =over 4 =item Mail::Server::IMAP4::User-EB(%options) -Option --Defined in --Default autodetect Mail::Box::Manager undef collection_type Mail::Box::Manage::User Mail::Box::Collection default_folder_type Mail::Box::Manager 'mbox' delimiter Mail::Box::Manage::User "/" folder_id_type Mail::Box::Manage::User Mail::Box::Identity folder_types Mail::Box::Manager folderdir Mail::Box::Manager [ '.' ] folderdirs Mail::Box::Manager > identity Mail::Box::Manage::User inbox Mail::Box::Manage::User undef index_filename $folderdir/index log Mail::Reporter 'WARNINGS' topfolder_name Mail::Box::Manage::User '=' trace Mail::Reporter 'WARNINGS' =over 2 =item autodetect => TYPE|ARRAY-OF-TYPES =item collection_type => CLASS =item default_folder_type => NAME|CLASS =item delimiter => STRING =item folder_id_type => CLASS|OBJECT =item folder_types => NEW-TYPE | ARRAY-OF-NEW-TYPES =item folderdir => DIRECTORY =item folderdirs => [DIRECTORIES] =item identity => OBJECT =item inbox => NAME =item index_filename => FILENAME =item log => LEVEL =item topfolder_name => STRING =item trace => LEVEL =back =back =head2 Attributes Extends L<"Attributes" in Mail::Box::Manage::User|Mail::Box::Manage::User/"Attributes">. =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( [$name] ) Inherited, see L =item $obj-EB() Returns the filename of the index file. =item $obj-EB($type, $class, %options) Inherited, see L =back =head2 Manage open folders Extends L<"Manage open folders" in Mail::Box::Manage::User|Mail::Box::Manage::User/"Manage open folders">. =over 4 =item $obj-EB($folder, %options) Inherited, see L =item $obj-EB(, %options) Inherited, see L =item $obj-EB($folder) Inherited, see L =item $obj-EB( [$foldername], %options ) Inherited, see L =item $obj-EB() Inherited, see L =back =head2 Manage existing folders Extends L<"Manage existing folders" in Mail::Box::Manage::User|Mail::Box::Manage::User/"Manage existing folders">. =head2 Manage folders Extends L<"Manage folders" in Mail::Box::Manage::User|Mail::Box::Manage::User/"Manage folders">. =over 4 =item $obj-EB($name, %options) Creates a new folder with the specified name. Folder info is returned, which will be very simple. In the accidental case that the folder already exists, a warning will be issued, and that folder's data returned. -Option --Defined in --Default create_real Mail::Box::Manage::User create_supers Mail::Box::Manage::User deleted Mail::Box::Manage::User id_options Mail::Box::Manage::User [] =over 2 =item create_real => BOOLEAN =item create_supers => BOOLEAN =item deleted => BOOLEAN =item id_options => ARRAY =back =item $obj-EB($name, %options) Remove all signs from the folder on the file-system. Messages still in the folder will be removed. This method returns a true value when the folder has been removed or not found, so "false" means failure. It is also possible to delete a folder using C<< $folder->delete >>, which will call this method here. %options, which are used for some other folder types, will be ignored here: the user's index contains the required details. -Option --Defined in --Default recursive Mail::Box::Manager =over 2 =item recursive => BOOLEAN =back example: how to delete a folder print "no xyz (anymore)\n" if $user->delete('xyz'); =item $obj-EB($name) Inherited, see L =item $obj-EB($name) Inherited, see L =item $obj-EB($name) Returns a hash with folder information. In normal circumstances, it is cheap to get these details, because they are cached in an index file, maintained by Mail::Box::Netzwert::UserIndex. DO NOT modify the values you find in the hash, because that data may or may not be lost (see Mail::Box::Netzwert::UserIndex subroutine change). DO NOT trust on the existence of any field in the info: fields may get renamed, removed, or added over time. Not all folder indexes will be generated by the same software release. example: how to get global info about a folder my $info = $user->folderInfo($name); # get info =item $obj-EB($oldname, $newname, %options) Inherited, see L =item $obj-EB() Inherited, see L =back =head2 Move messages to folders Extends L<"Move messages to folders" in Mail::Box::Manage::User|Mail::Box::Manage::User/"Move messages to folders">. =over 4 =item $obj-EB( [$folder|$foldername], $messages, %options ) Inherited, see L =item $obj-EB( [$folder|$foldername], $messages, %options ) Inherited, see L =item $obj-EB( [$folder|$foldername], $messages, %options ) Inherited, see L =back =head2 Manage message threads Extends L<"Manage message threads" in Mail::Box::Manage::User|Mail::Box::Manage::User/"Manage message threads">. =over 4 =item $obj-EB( [$folders], %options ) Inherited, see L =back =head2 Internals Extends L<"Internals" in Mail::Box::Manage::User|Mail::Box::Manage::User/"Internals">. =over 4 =item $obj-EB($url) Inherited, see L =item $obj-EB($folder, $messages) Inherited, see L =item $obj-EB($folder, $messages) Inherited, see L =back =head2 Error handling Extends L<"Error handling" in Mail::Box::Manage::User|Mail::Box::Manage::User/"Error handling">. =over 4 =item $obj-EB() Inherited, see L =item $obj-EB($object) Inherited, see L =item $obj-EB( [$level]|[$loglevel, $tracelevel]|[$level, $callback] ) =item Mail::Server::IMAP4::User-EB( [$level]|[$loglevel, $tracelevel]|[$level, $callback] ) Inherited, see L =item $obj-EB() Inherited, see L =item $obj-EB( [$level, [$strings]] ) =item Mail::Server::IMAP4::User-EB( [$level, [$strings]] ) Inherited, see L =item $obj-EB($level) =item Mail::Server::IMAP4::User-EB($level) Inherited, see L =item $obj-EB() Inherited, see L =item $obj-EB() Inherited, see L =item $obj-EB( [$level] ) Inherited, see L =item $obj-EB( [$level] ) Inherited, see L =item $obj-EB( [$level] ) Inherited, see L =item $obj-EB() Inherited, see L =back =head2 Cleanup Extends L<"Cleanup" in Mail::Box::Manage::User|Mail::Box::Manage::User/"Cleanup">. =over 4 =item $obj-EB() Inherited, see L =back =head1 DETAILS Extends L<"DETAILS" in Mail::Box::Manage::User|Mail::Box::Manage::User/"DETAILS">. =head1 DIAGNOSTICS =over 4 =item Error: Cannot create folder directory $dir: $! =item Error: Cannot rename $name to $new: higher levels missing Unless you set L, all higher level folders must exist before this new one can be created. =item Error: Cannot write name for folder in $file: $! =item Error: Failed writing folder name to $file: $! =item Warning: Folder $name already exists, creation skipped =item Error: Folder $name is already open. You cannot ask the manager for a folder which is already open. In some older releases (before MailBox 2.049), this was permitted, but then behaviour changed, because many nasty side-effects are to be expected. For instance, an L on one folder handle would influence the second, probably unexpectedly. =item Error: Folder $name is not a Mail::Box; cannot add a message. The folder where the message should be appended to is an object which is not a folder type which extends L. Probably, it is not a folder at all. =item Warning: Folder does not exist, failed opening $type folder $name. The folder does not exist and creating is not permitted (see L) or did not succeed. When you do not have sufficient access rights to the folder (for instance wrong password for POP3), this warning will be produced as well. The manager tried to open a folder of the specified type. It may help to explicitly state the type of your folder with the C option. There will probably be another warning or error message which is related to this report and provides more details about its cause. You may also have a look at L and L. =item Warning: Folder type $type is unknown, using autodetect. The specified folder type (see L, possibly derived from the folder name when specified as url) is not known to the manager. This may mean that you forgot to require the L extension which implements this folder type, but probably it is a typo. Usually, the manager is able to figure-out which type to use by itself. =item Error: Illegal folder URL '$url'. The folder name was specified as URL, but not according to the syntax. See L for an description of the syntax. =item Error: No foldername specified to open. C needs a folder name as first argument (before the list of options), or with the C option within the list. If no name was found, the MAIL environment variable is checked. When even that does not result in a usable folder, then this error is produced. The error may be caused by an accidental odd-length option list. =item Error: Package $package does not implement $method. Fatal error: the specific 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. =item Error: Unable to remove folder $dir =item Error: Use appendMessage() to add messages which are not in a folder. You do not need to copy this message into the folder, because you do not share the message between folders. =item Warning: Use moveMessage() or copyMessage() to move between open folders. The message is already part of a folder, and now it should be appended to a different folder. You need to decide between copy or move, which both will clone the message (not the body, because they are immutable). =item Warning: Will never create a folder $name without having write access. You have set L, but only want to read the folder. Create is only useful for folders which have write or append access modes (see L). =back =head1 SEE ALSO This module is part of Mail-Box-IMAP4 distribution version 3.002, built on June 29, 2017. Do not forget to read L, L, and L. Examples are included in the Mail-Box distribution, directories 'examples' and 'scripts'. Browseable manuals, papers, and other released material van be found at Website: F The central modules (in separate distributions) in the MailBox suite are: L, L, L, L, L, L (unpublished), L, L, and L. Please post questions or ideas to the author F. =head1 LICENSE Copyrights 2001-2017 by [Mark Overmeer]. For other contributors see ChangeLog. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See F Mail-Box-IMAP4-3.002/lib/Mail/Server/IMAP4/List.pm0000644000175000001440000000555013125177637021456 0ustar00markovusers00000000000000# Copyrights 2001-2017 by [Mark Overmeer]. # For other contributors see ChangeLog. # See the manual pages for details on the licensing terms. # Pod stripped from pm file by OODoc 2.02. use strict; use warnings; package Mail::Server::IMAP4::List; use vars '$VERSION'; $VERSION = '3.002'; sub new($) { my ($class, %args) = @_; my $self = bless {}, $class; my $user = $self->{MSIL_user} = $args{user}; $self->{MSIL_folders} = $args{folders}; $self->{MSIL_inbox} = $args{inbox}; $self->{MSIL_delim} = exists $args{delimiter} ? $args{delimiter} : '/'; $self; } #------------------------------------------ sub delimiter(;$) { my $delim = shift->{MSIL_delim}; ref $delim ? $delim->(shift) : $delim; } #------------------------------------------ sub user() { shift->{MSIL_user} } #------------------------------------------ sub folders() { my $self = shift; $self->{MSIL_folders} || $self->user->topfolder; } #------------------------------------------ sub inbox() { my $self = shift; $self->{MSIL_inbox} || $self->user->inbox; } #------------------------------------------ sub list($$) { my ($self, $base, $pattern) = @_; return [ '(\Noselect)', $self->delimiter($base), '' ] if $pattern eq ''; my $delim = $self->delimiter($base); my @path = split $delim, $base; my $folder = $self->folders; while(@path && defined $folder) { $folder = $folder->folder(shift @path); } defined $folder or return (); my @pattern = split $delim, $pattern; return $self->_list($folder, $delim, @pattern); } sub _list($$@) { my ($self, $folder, $delim) = (shift, shift, shift); if(!@_) { my @flags; push @flags, '\Noselect' if $folder->onlySubfolders || $folder->deleted; push @flags, '\Noinferiors' unless $folder->inferiors; my $marked = $folder->marked; push @flags, ($marked ? '\Marked' : '\Unmarked') if defined $marked; local $" = ' '; # This is not always correct... should compose the name from the # parts... but in nearly all cases, the following is sufficient. my $name = $folder->fullname; for($name) { s/^=//; s![/\\]!$delim!g; } return [ "(@flags)", $delim, $name ]; } my $pat = shift; if($pat eq '%') { my $subs = $folder->subfolders or return $self->_list($folder, $delim); return map { $self->_list($_, $delim, @_) } $subs->sorted; } if($pat eq '*') { my @own = $self->_list($folder, $delim, @_); my $subs = $folder->subfolders or return @own; return @own, map { $self->_list($_, $delim, '*', @_) } $subs->sorted; } $folder = $folder->find(subfolders => $pat) or return (); $self->_list($folder, $delim, @_); } #------------------------------------------ 1; Mail-Box-IMAP4-3.002/lib/Mail/Server/IMAP4/List.pod0000644000175000001440000001102713125177641021613 0ustar00markovusers00000000000000=encoding utf8 =head1 NAME Mail::Server::IMAP4::List - folder related IMAP4 answers =head1 SYNOPSIS my $imap = Mail::Server::IMAP4::List->new ( folders => $folders # Mail::Box::Identity , inbox => $inbox # Mail::Box , delimiter => '#' ); my $imap = Mail::Server::IMAP4::List->new(user => $user); print $imap->list(...); # for LIST command =head1 DESCRIPTION =head1 METHODS =head2 Constructors =over 4 =item Mail::Server::IMAP4::List-EB($user) Create a (temporary) object to handle the LIST requests for a certain user, based upon a set of folders. The data is kept by L and L objects, which mean that the folders will not be opened to answer these questions. -Option --Default delimeter '/' folders inbox user =over 2 =item delimeter => STRING|CODE Either the constant delimiter, or a code reference which will get passed a folder name and should return the delimiter string used in that name. If that folder name is empty, the default delimiter must be reported. See L for an example. =item folders => OBJECT You need to specify either a set of folders explicitly or via the user. Some L OBJECT is needed. =item inbox => BOOLEAN For now, only used to see whether there is an inbox, so a truth value will do. This may change in the future. By default, the flag is set if C<$user->inbox> is defined. =item user => OBJECT A L OBJECT, representing the user who's folders must get reported. =back =back =head2 Attributes =over 4 =item $obj-EB( [$foldername] ) Returns the delimiter string. The foldername is only required when a CODE reference was specified at initiation. example: setting-up an IMAP4 delimeter sub delim($) { my $path = shift; my ($delim, $root) = $path =~ m/^(#news\.)/ ? ('.', $1) = $path =~ m!^/! ? ('/', '/') : ('/', ''); wantarray ? ($delim, $root) : $delim; } my $list = Mail::Server::IMAP4::List->new(delimiter => \&delim, ...); print $list->delimiter('abc/xyz'); # returns a / (slash) and '' print $list->delimiter('#news.feed'); # returns a . (dot) and $news. print $list->delimiter(''); # returns default delimiter =item $obj-EB() Returns the L of the toplevel folder. =item $obj-EB() Returns the L or filename of the INBOX. =item $obj-EB() Returns the L object, if defined. =back =head2 IMAP Commands =over 4 =item $obj-EB($base, $pattern) IMAP's LIST command. The request must be partially decoded, the answer will need to be encoded. example: using IMAP list my $imap = Mail::Server::IMAP4::List->new(delimiter => \&delim, ...); local $" = ';'; my @lines = $imap->list('', ''); # returns the default delimiter print ">@{$lines[0]}<"; # >(\Noselect);/;< my @lines = $imap->list('#news',''); # specific delimiter print ">@{$lines[0]}<"; # >(\Noselect);.;< my @lines = $imap->list('top/x/', '%'); print ">@$_<," foreach @lines; # >();/;/tmp/x/y<,>(\Marked);/;/tmp/x/z< =back =head1 DETAILS See =over 4 =item RFC2060: "Internet Message Access Protocol IMAP4v1" sections 6.3.8 (LIST question) and 7.2.2 (LIST answer) =back =head1 SEE ALSO This module is part of Mail-Box-IMAP4 distribution version 3.002, built on June 29, 2017. Do not forget to read L, L, and L. Examples are included in the Mail-Box distribution, directories 'examples' and 'scripts'. Browseable manuals, papers, and other released material van be found at Website: F The central modules (in separate distributions) in the MailBox suite are: L, L, L, L, L, L (unpublished), L, L, and L. Please post questions or ideas to the author F. =head1 LICENSE Copyrights 2001-2017 by [Mark Overmeer]. For other contributors see ChangeLog. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See F Mail-Box-IMAP4-3.002/lib/Mail/Server/IMAP4/Fetch.pod0000644000175000001440000000712213125177641021732 0ustar00markovusers00000000000000=encoding utf8 =head1 NAME Mail::Server::IMAP4::Fetch - message info for IMAP protocol speed-up =head1 SYNOPSIS my $imap = Mail::Server::IMAP4::Fetch->new($msg); print $imap->fetchBody(1); # for FETCH BODYSTRUCTURE print $imap->fetchBody; # for FETCH BODY print $imap->fetchEnvelope; # for FETCH ENVELOPE print $imap->fetchSize; =head1 DESCRIPTION Create a new object hierarchy, which contains information to capture the most important details about the message. The object can be used to speed-up IMAP-server implementations, as L. The object used here is a simplified representation of a L object. It does not maintain headers and does not refer to the folder. It only works with messages stored in a file. Therefore, this object can be frozen by L if you want to. =head1 METHODS =head2 Constructors =over 4 =item Mail::Server::IMAP4::Fetch-EB( <$message|$part>, %options ) -Option --Default md5checksums 0 =over 2 =item md5checksums => BOOLEAN =back =back =head2 Attributes =over 4 =item $obj-EB() =item $obj-EB() =item $obj-EB() =back =head2 IMAP Commands =over 4 =item $obj-EB($extended) Returns one string, representing the message's structure as defined by the IMAP protocol. The boolean argument indicates whether you like to have the $extended information, as the imap command 'FETCH BODYSTRUCTURE' defines or the limited information of 'FETCH BODY'. =item $obj-EB() Returns a string representation of some header information. =item $obj-EB() Returns the size of the message body. =item $obj-EB( [$partnr] ) The partnummer is a list of dot-separated positive integers, numbering (nested) parts in multi-part message bodies. By default, the info of the main message is returned. example: my $partinfo = $msg->info->part('1.2.1'); print $msg->info->part('3.3')->fetchBody; =item $obj-EB( [<$fh|undef>, [$number]] ) Print the structure of the fetch data to the specified $fh or the selected filehandle. When explicitly C is specified as handle, then the output will be returned as string. Only a limited set of the information is displayed. example: my $imap = ...; $imap->printStructure(\*OUTPUT); $imap->printStructure; my $struct = $imap->printStructure(undef); =back =head2 Internals =head1 DETAILS See =over 4 =item RFC2060: "Internet Message Access Protocol IMAP4v1" section 7.4.2 =item RFC2045: "MIME Part One: Format of Internet Message Bodies". =back =head1 SEE ALSO This module is part of Mail-Box-IMAP4 distribution version 3.002, built on June 29, 2017. Do not forget to read L, L, and L. Examples are included in the Mail-Box distribution, directories 'examples' and 'scripts'. Browseable manuals, papers, and other released material van be found at Website: F The central modules (in separate distributions) in the MailBox suite are: L, L, L, L, L, L (unpublished), L, L, and L. Please post questions or ideas to the author F. =head1 LICENSE Copyrights 2001-2017 by [Mark Overmeer]. For other contributors see ChangeLog. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See F Mail-Box-IMAP4-3.002/lib/Mail/Server/IMAP4/Search.pm0000644000175000001440000000067413125177637021752 0ustar00markovusers00000000000000# Copyrights 2001-2017 by [Mark Overmeer]. # For other contributors see ChangeLog. # See the manual pages for details on the licensing terms. # Pod stripped from pm file by OODoc 2.02. use strict; use warnings; package Mail::Server::IMAP4::Search; use vars '$VERSION'; $VERSION = '3.002'; use base 'Mail::Box::Search'; sub init($) { my ($self, $args) = @_; $self->notImplemented; } #------------------------------------------- 1; Mail-Box-IMAP4-3.002/lib/Mail/Server/IMAP4/User.pm0000644000175000001440000000617713125177637021467 0ustar00markovusers00000000000000# Copyrights 2001-2017 by [Mark Overmeer]. # For other contributors see ChangeLog. # See the manual pages for details on the licensing terms. # Pod stripped from pm file by OODoc 2.02. use strict; use warnings; package Mail::Server::IMAP4::User; use vars '$VERSION'; $VERSION = '3.002'; use base 'Mail::Box::Manage::User'; sub init($) { my ($self, $args) = @_; $self->SUPER::init($args) or return (); my $fn = $args->{indexfile}; $self->{MSNU_indexfile} = defined $fn ? $fn : ($self->folderdir . '/index'); $self; } #------------------------------------------- sub indexFilename() { shift->{MSNU_indexfile} }; #------------------------------------------- sub folderInfo($) { my $index = shift->index or return (); $index->folder(shift); } #------------------------------------------- sub delete($) { my ($self, $name) = @_; my $index = $self->index->startModify or return 0; unless($self->_delete($index, $name)) { $self->cancelModification($index); return 0; } $index->write; } sub _delete($$) { my ($self, $index, $name) = @_; # First clean all subfolders recursively foreach my $subf ($index->subfolders($name)) { $self->_delete($index, $subf) or return 0; } # Already disappeared? Shouldn't happen, but ok my $info = $index->folder($name) or return 1; # Bluntly clean-out the directory if(my $dir = $info->{Directory}) { # Bluntly try to remove, but error is not set if(remove(\1, $dir) != 0 && -d $dir) { $self->log(error => "Unable to remove folder $dir"); return 0; } } # Remove (sub)folder from index $index->folder($name, undef); 1; } #------------------------------------------- sub create($@) { my ($self, $name) = (shift, shift); my $index = $self->index->startModify or return undef; if(my $info = $index->folder($name)) { $self->log(WARNING => "Folder $name already exists, creation skipped"); return $info; } my $uniq = $index->createUnique; # Create the directory # Also in this case, we bluntly try to create it, and when it doesn't # work, we check whether we did too much. This may safe an NFS stat. my $dir = $self->home . '/F' . $uniq; unless(mkdir $dir, 0750) { my $rc = "$!"; unless(-d $dir) # replaces $! { $self->log(ERROR => "Cannot create folder directory $dir: $rc"); return undef; } } # Write folder name in directory, for recovery purposes. my $namefile = "$dir/name"; unless(open NAME, '>:encoding(utf-8)', $namefile) { $self->log(ERROR => "Cannot write name for folder in $namefile: $!"); return undef; } print NAME "$name\n"; unless(close NAME) { $self->log(ERROR => "Failed writing folder name to $namefile: $!"); return undef; } # Add folder to the index my $facts = $self->folder ( $name , Folder => $name , Directory => $dir , Messages => 0 , Size => 0 ); $self->write && $facts; } #------------------------------------------- 1; Mail-Box-IMAP4-3.002/lib/Mail/Server/IMAP4/Fetch.pm0000644000175000001440000001710013125177637021566 0ustar00markovusers00000000000000# Copyrights 2001-2017 by [Mark Overmeer]. # For other contributors see ChangeLog. # See the manual pages for details on the licensing terms. # Pod stripped from pm file by OODoc 2.02. use strict; use warnings; package Mail::Server::IMAP4::Fetch; use vars '$VERSION'; $VERSION = '3.002'; use Date::Parse; use Digest::MD5 qw/md5_base64/; sub new($) { my ($class, $part, %args) = @_; my $head = $part->head; my $body = $part->body; my $type = $body->type->study; my $self = bless { type => $type->body , typeattr => [ $type->attrPairs ] , charset => $body->charset , bodylines => $body->nrLines , bodysize => $body->size }, $class; $self->{headbegin} = ($head->fileLocation)[0]; @{$self}{qw/bodybegin bodyend/} = $body->fileLocation; # The fields use the defined() check, to avoid accidental expensive # stringification by the field objects. my ($field, $value); $self->{date} = $field->unfoldedBody if defined($field = $head->get('Date')); $self->{subject} = $field->unfoldedBody if defined($field = $head->get('Subject')); $self->{description} = $field->unfoldedBody if defined($field = $head->get('Content-Description')); $self->{language} = $field->unfoldedBody if defined($field = $head->get('Content-Language')); $self->{filename} = $value if defined($value = $body->dispositionFilename); $self->{bodyMD5} = md5_base64($body->string) if $args{md5checksums}; if(defined($field = $body->transferEncoding)) { my $tf = $field->unfoldedBody; $self->{transferenc} = $tf unless $tf eq 'none'; } # Should become: # $self->{disposition} = [ $field->body, $field->study->attributes ] if(defined($field = $body->disposition)) { my $how = $field->body; $how = $body->isText ? 'inline' : 'attachment' if $how eq 'none'; $self->{disposition} = [ $how, $field->attributes ]; } else { $self->{disposition} = [ ($body->isText ? 'inline' : 'attachment') ]; } my $id = $head->get('Content-Message-ID') || $head->get("Message-ID"); if(defined $id) { my $msgid = $id->unfoldedBody; $msgid =~ s/^\<*/*$/>/; $self->{messageid} = $msgid if length $msgid; } foreach my $addr ( qw/to from sender reply-to cc bcc/ ) { my $addrs = $head->study($addr) or next; foreach my $group ($addrs->groups) { my @addrs = map { [ $_->phrase, $_->username, $_->domain ] } $group->addresses; push @{$self->{$addr}}, [ $group->name, @addrs ]; } } if($body->isMultipart) { $self->{parts} = [ map { $class->new($_) } $body->parts ]; } elsif($body->isNested) { $self->{nest} = $class->new($body->nested); } $self; } #------------------------------------------ sub headLocation() { @{ (shift) }{ qw/headbegin bodybegin/ } } sub bodyLocation() { @{ (shift) }{ qw/bodybegin bodyend/ } } sub partLocation() { @{ (shift) }{ qw/headbegin bodyend/ } } #------------------------------------------ sub fetchBody($) { my ($self, $extended) = @_; my $type = uc $self->{type}; my ($mediatype, $subtype) = split m[/], $type; if($self->{parts}) { # Multipart message # WARNING: no blanks between part descriptions my $parts = join '', map $_->fetchBody($extended), @{$self->{parts}}; my @fields = (\$parts, $subtype || 'MIXED'); if($extended) # only included when any valid info { my @attr; # don't know what to include here my @disp; # don't know about this either push @fields, \@attr, \@disp, $self->{language} if @attr || @disp || defined $self->{language}; } return $self->_imapList(@fields); } # # Simple message # my @fields = ( ($mediatype || 'TEXT') , ($subtype || 'PLAIN') , $self->{typeattr} , $self->{messageid} , $self->{description} , uc($self->{transferenc} || '8BIT') , \($self->{bodysize}) ); if(my $nest = $self->{nest}) { # type MESSAGE (message/rfc822 encapsulated) push @fields , \$nest->fetchEnvelope, , \$nest->fetchBody($extended); } push @fields, \$self->{bodylines}; push @fields, @{$self}{ qw/bodyMD5 disposition language/ } if $extended && ($self->{bodyMD5} || $self->{disposition} || $self->{language}); $self->_imapList(@fields); } sub fetchEnvelope() { my $self = shift; my @fields = ($self->{date}, $self->{subject}); foreach my $addr ( qw/from sender reply-to to cc bcc/ ) { unless($self->{$addr}) { push @fields, undef; # NIL next; } # For now, group information is ignored... RFC2060 is very # unclear about it... and seems incompatible with RFC2822 my $addresses = ''; foreach my $group (@{$self->{$addr}}) { my ($name, @addr) = @$group; # addr_adl is obsoleted by rfc2822 $addresses .= $self->_imapList($_->[0], undef, $_->[1], $_->[2]) foreach @addr; } push @fields, \$addresses; } push @fields, $self->{'in-reply-to'}, $self->{messageid}; $self->_imapList(@fields); } sub fetchSize() { shift->{bodysize} } sub part(;$) { my $self = shift; my $nr = shift or return $self; my @nrs = split /\./, $nr; while(@nrs) { my $take = shift @nrs; if(exists $self->{nest} && $take==1) { $self = $self->{nest} } elsif(exists $self->{parts} && @{$self->{parts}} >= $take) { $self = $self->{parts}[$take-1] } else { return undef } } $self; } sub printStructure(;$$) { my $self = shift; my $fh = @_ ? shift : select; my $number = @_ ? shift : ''; my $buffer; # only filled if filehandle==undef open $fh, '>:raw', \$buffer unless defined $fh; my $type = $self->{type}; my $subject = $self->{subject} || ''; my $text = "$number $type: $subject\n"; my $hbegin = $self->{headbegin} || 0; my $bbegin = $self->{bodybegin} || '?'; my $bodyend = $self->{bodyend} || '?'; my $size = defined $self->{bodysize} ? $self->{bodysize} : '?'; my $lines = defined $self->{bodylines} ? $self->{bodylines} : '?'; $text .= ' ' x (length($number) + 1); $text .= "@ $hbegin-$bbegin-$bodyend, $size bytes, $lines lines\n"; ref $fh eq 'GLOB' ? (print $fh $text) : $fh->print($text); if($self->{nest}) { $self->{nest}->printStructure($fh, length($number) ? $number.'.1' :'1'); } elsif($self->{parts}) { my $count = 1; $number .= '.' if length $number; $_->printStructure($fh, $number.$count++) foreach @{$self->{parts}}; } $buffer; } #------------------------------------------ # Concatenate the elements of a list, as the IMAP protocol does. # ARRAYS are included a sublist, and normal strings get quoted. # Pass a ref-scalar if something needs to be included without # quoting. sub _imapList(@) { my $self = shift; my @f; foreach (@_) { if(ref $_ eq 'ARRAY') { push @f, $self->_imapList(@$_) } elsif(ref $_ eq 'SCALAR') { push @f, ${$_} } elsif(!defined $_) { push @f, 'NIL' } else { my $copy = $_; $copy =~ s/\\/\\\\/g; $copy =~ s/\"/\\"/g; push @f, qq#"$_"#; } } local $" = ' '; "(@f)"; } #------------------------------------------ 1; Mail-Box-IMAP4-3.002/lib/Mail/Server/IMAP4.pm0000644000175000001440000000074713125177637020546 0ustar00markovusers00000000000000# Copyrights 2001-2017 by [Mark Overmeer]. # For other contributors see ChangeLog. # See the manual pages for details on the licensing terms. # Pod stripped from pm file by OODoc 2.02. use strict; use warnings; package Mail::Server::IMAP4; use vars '$VERSION'; $VERSION = '3.002'; use base 'Mail::Server'; use Mail::Server::IMAP4::List; use Mail::Server::IMAP4::Fetch; use Mail::Server::IMAP4::Search; use Mail::Transport::IMAP4; #------------------------------------------- 1; Mail-Box-IMAP4-3.002/lib/Mail/Server/IMAP4.pod0000644000175000001440000000524713125177641020707 0ustar00markovusers00000000000000=encoding utf8 =head1 NAME Mail::Server::IMAP4 - IMAP4 server implementation (not completed) =head1 INHERITANCE Mail::Server::IMAP4 is a Mail::Server is a Mail::Reporter =head1 SYNOPSIS !!!Partially implemented!!!! my $server = Mail::Server::IMAP4->new($msg); =head1 DESCRIPTION This module is a place-holder, which can be used to grow code which is needed to implement a full IMAP4 server. Although the server is not implemented, parts of this server are already available. =over 4 =item * L used to capture "FETCH" related information from a message, and produce server-side FETCH answers. =item * L produce LIST reponses about existing folders. This works in combination with a L object. =item * L the SEARCH request. Not implemented yet... looking for a volunteer. =back Extends L<"DESCRIPTION" in Mail::Server|Mail::Server/"DESCRIPTION">. =head1 METHODS Extends L<"METHODS" in Mail::Server|Mail::Server/"METHODS">. =head1 DETAILS See =over 4 =item RFC2060: "Internet Message Access Protocol IMAP4v1" =back Extends L<"DETAILS" in Mail::Server|Mail::Server/"DETAILS">. =head1 DIAGNOSTICS =over 4 =item Error: Package $package does not implement $method. Fatal error: the specific 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. =back =head1 SEE ALSO This module is part of Mail-Box-IMAP4 distribution version 3.002, built on June 29, 2017. Do not forget to read L, L, and L. Examples are included in the Mail-Box distribution, directories 'examples' and 'scripts'. Browseable manuals, papers, and other released material van be found at Website: F The central modules (in separate distributions) in the MailBox suite are: L, L, L, L, L, L (unpublished), L, L, and L. Please post questions or ideas to the author F. =head1 LICENSE Copyrights 2001-2017 by [Mark Overmeer]. For other contributors see ChangeLog. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See F Mail-Box-IMAP4-3.002/lib/Mail/Box/0000755000175000001440000000000013125177642016644 5ustar00markovusers00000000000000Mail-Box-IMAP4-3.002/lib/Mail/Box/IMAP4/0000755000175000001440000000000013125177642017456 5ustar00markovusers00000000000000Mail-Box-IMAP4-3.002/lib/Mail/Box/IMAP4/Head.pod0000644000175000001440000001652713125177641021035 0ustar00markovusers00000000000000=encoding utf8 =head1 NAME Mail::Box::IMAP4::Head - header fields related IMAP interface =head1 INHERITANCE Mail::Box::IMAP4::Head is a Mail::Message::Head is a Mail::Reporter =head1 SYNOPSIS =head1 DESCRIPTION This class implements a pure IMAP4 protocol interface, where as little data is retrieved from the header as possible. This may look nice to you, but is not sufficient for many tasks. For instance, you cannot removed or modify fields this way. Change L to C or C, to get a message header which is capable of performing all possible games with headers. On the other hand: the other settings are not 100% safe... Extends L<"DESCRIPTION" in Mail::Message::Head|Mail::Message::Head/"DESCRIPTION">. =head1 OVERLOADED Extends L<"OVERLOADED" in Mail::Message::Head|Mail::Message::Head/"OVERLOADED">. =over 4 =item overload: B<""> Inherited, see L =item overload: B Inherited, see L =back =head1 METHODS Extends L<"METHODS" in Mail::Message::Head|Mail::Message::Head/"METHODS">. =head2 Constructors Extends L<"Constructors" in Mail::Message::Head|Mail::Message::Head/"Constructors">. =over 4 =item Mail::Box::IMAP4::Head-EB( [PAIR|$field]-LIST ) Inherited, see L =item Mail::Box::IMAP4::Head-EB(%options) -Option --Defined in --Default cache_fields false field_type Mail::Message::Head Mail::Message::Field::Fast log Mail::Reporter 'WARNINGS' message Mail::Message::Head undef modified Mail::Message::Head trace Mail::Reporter 'WARNINGS' =over 2 =item cache_fields => BOOLEAN This is only a read-cache on fields, because this kind of header does not allow writing of fields. See L, this value is set to C for C and C for C.. =item field_type => CLASS =item log => LEVEL =item message => MESSAGE =item modified => BOOLEAN =item trace => LEVEL =back =back =head2 The header Extends L<"The header" in Mail::Message::Head|Mail::Message::Head/"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( [$message] ) Inherited, see L =item $obj-EB( [BOOLEAN] ) Inherited, see L =item $obj-EB() Inherited, see L =back =head2 Access to the header Extends L<"Access to the header" in Mail::Message::Head|Mail::Message::Head/"Access to the header">. =over 4 =item $obj-EB( $name, [$index] ) Get the information about the header line $name. Realization will take place. =item $obj-EB( $name, [$index] ) Inherited, see L =back =head2 About the body Extends L<"About the body" in Mail::Message::Head|Mail::Message::Head/"About the body">. =over 4 =item $obj-EB() Inherited, see L =item $obj-EB() Inherited, see L =back =head2 Internals Extends L<"Internals" in Mail::Message::Head|Mail::Message::Head/"Internals">. =over 4 =item $obj-EB($field) Inherited, see L =item $obj-EB($fields) Inherited, see L =item $obj-EB() Inherited, see L =item $obj-EB() Inherited, see L =item $obj-EB($distance) Inherited, see L =item $obj-EB($parser) Inherited, see L =item $obj-EB($field) Inherited, see L =back =head2 Error handling Extends L<"Error handling" in Mail::Message::Head|Mail::Message::Head/"Error handling">. =over 4 =item $obj-EB() Inherited, see L =item $obj-EB($object) Inherited, see L =item $obj-EB( [$level]|[$loglevel, $tracelevel]|[$level, $callback] ) =item Mail::Box::IMAP4::Head-EB( [$level]|[$loglevel, $tracelevel]|[$level, $callback] ) Inherited, see L =item $obj-EB() Inherited, see L =item $obj-EB( [$level, [$strings]] ) =item Mail::Box::IMAP4::Head-EB( [$level, [$strings]] ) Inherited, see L =item $obj-EB($level) =item Mail::Box::IMAP4::Head-EB($level) Inherited, see L =item $obj-EB() Inherited, see L =item $obj-EB() Inherited, see L =item $obj-EB( [$level] ) Inherited, see L =item $obj-EB( [$level] ) Inherited, see L =item $obj-EB( [$level] ) Inherited, see L =item $obj-EB() Inherited, see L =back =head2 Cleanup Extends L<"Cleanup" in Mail::Message::Head|Mail::Message::Head/"Cleanup">. =over 4 =item $obj-EB() Inherited, see L =back =head1 DETAILS Extends L<"DETAILS" in Mail::Message::Head|Mail::Message::Head/"DETAILS">. =head1 DIAGNOSTICS =over 4 =item Error: Package $package does not implement $method. Fatal error: the specific 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. =back =head1 SEE ALSO This module is part of Mail-Box-IMAP4 distribution version 3.002, built on June 29, 2017. Do not forget to read L, L, and L. Examples are included in the Mail-Box distribution, directories 'examples' and 'scripts'. Browseable manuals, papers, and other released material van be found at Website: F The central modules (in separate distributions) in the MailBox suite are: L, L, L, L, L, L (unpublished), L, L, and L. Please post questions or ideas to the author F. =head1 LICENSE Copyrights 2001-2017 by [Mark Overmeer]. For other contributors see ChangeLog. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See F Mail-Box-IMAP4-3.002/lib/Mail/Box/IMAP4/Message.pm0000644000175000001440000000751513125177637021414 0ustar00markovusers00000000000000# Copyrights 2001-2017 by [Mark Overmeer]. # For other contributors see ChangeLog. # See the manual pages for details on the licensing terms. # Pod stripped from pm file by OODoc 2.02. use strict; use warnings; package Mail::Box::IMAP4::Message; use vars '$VERSION'; $VERSION = '3.002'; use base 'Mail::Box::Net::Message'; use Date::Parse 'str2time'; sub init($) { my ($self, $args) = @_; $self->SUPER::init($args); $self->{MBIM_write_labels} = exists $args->{write_labels} ? $args->{write_labels} : 1; $self->{MBIM_cache_labels} = $args->{cache_labels}; $self->{MBIM_cache_head} = $args->{cache_head}; $self->{MBIM_cache_body} = $args->{cache_body}; $self; } sub size($) { my $self = shift; return $self->SUPER::size unless $self->isDelayed; $self->fetch('RFC822.SIZE'); } sub recvstamp() { my $date = shift->fetch('INTERNALDATE'); defined $date ? str2time($date) : undef; } sub label(@) { my $self = shift; my $imap = $self->folder->transporter or return; my $id = $self->unique or return; if(@_ == 1) { # get one value only my $label = shift; my $labels = $self->{MM_labels}; return $labels->{$label} if exists $labels->{$label} || exists $labels->{seen}; my $flags = $imap->getFlags($id); if($self->{MBIM_cache_labels}) { # the program may have added own labels @{$labels}{keys %$flags} = values %$flags; delete $self->{MBIM_labels_changed}; } return $flags->{$label}; } my @private; if($self->{MBIM_write_labels}) { @private = $imap->setFlags($id, @_); delete $self->{MBIM_labels_changed}; } else { @private = @_; } my $labels = $self->{MM_labels}; my @keep = $self->{MBIM_cache_labels} ? @_ : @private; while(@keep) { my ($k, $v) = (shift @keep, shift @keep); next if defined $labels->{$k} && $labels->{$k} eq $v; $self->{MBIM_labels_changed}++; $labels->{$k} = $v; } $self->modified(1) if @private && $self->{MBIM_labels_changed}; $self; } sub labels() { my $self = shift; my $id = $self->unique; my $labels = $self->SUPER::labels; $labels = { %$labels } unless $self->{MBIM_cache_labels}; if($id && !exists $labels->{seen}) { my $imap = $self->folder->transporter or return; my $flags = $imap->getFlags($id); @{$labels}{keys %$flags} = values %$flags; } $labels; } #------------------------------------------- sub loadHead() { my $self = shift; my $head = $self->head; return $head unless $head->isDelayed; $head = $self->folder->getHead($self); $self->head($head) if $self->{MBIM_cache_head}; $head; } sub loadBody() { my $self = shift; my $body = $self->body; return $body unless $body->isDelayed; (my $head, $body) = $self->folder->getHeadAndBody($self); return undef unless defined $head; $self->head($head) if $self->{MBIM_cache_head} && $head->isDelayed; $self->storeBody($body) if $self->{MBIM_cache_body}; $body; } sub fetch(@) { my ($self, @info) = @_; my $folder = $self->folder; my $answer = ($folder->fetch( [$self], @info))[0]; @info==1 ? $answer->{$info[0]} : @{$answer}{@info}; } sub writeDelayed($$) { my ($self, $foldername, $imap) = @_; my $id = $self->unique; my $labels = $self->labels; if($self->head->modified || $self->body->modified || !$id) { $imap->appendMessage($self, $foldername); if($id) { $self->delete; $self->unique(undef); } } elsif($self->{MBIM_labels_changed}) { $imap->setFlags($id, %$labels); # non-IMAP4 labels disappear delete $self->{MBIM_labels_changed}; } $self; } #------------------------------------------- 1; Mail-Box-IMAP4-3.002/lib/Mail/Box/IMAP4/Message.pod0000644000175000001440000005217213125177641021554 0ustar00markovusers00000000000000=encoding utf8 =head1 NAME Mail::Box::IMAP4::Message - one message on a IMAP4 server =head1 INHERITANCE Mail::Box::IMAP4::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::IMAP4 ... my $message = $folder->message(10); =head1 DESCRIPTION A C represents one message on a IMAP4 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 Mail::Box::IMAP4::Message-EB(%options) -Option --Defined in --Default body Mail::Message undef body_type Mail::Box::Message Mail::Message::Body::Lines cache_body cache_head cache_labels deleted Mail::Message field_type Mail::Message undef folder Mail::Box::Message head Mail::Message undef head_type Mail::Message Mail::Message::Head::Complete labels Mail::Message {} log Mail::Reporter 'WARNINGS' messageId Mail::Message undef modified Mail::Message size Mail::Box::Message undef trace Mail::Reporter 'WARNINGS' trusted Mail::Message unique Mail::Box::Net::Message write_labels =over 2 =item body => OBJECT =item body_type => CODE|CLASS =item cache_body => BOOLEAN =item cache_head => BOOLEAN =item cache_labels => BOOLEAN All standard IMAP labels can be cached on the local server to improve speed. This has the same dangers as setting C to false. The caching starts when the first label of the message was read. =item deleted => BOOLEAN =item field_type => CLASS =item folder => FOLDER =item head => OBJECT =item head_type => CLASS =item labels => ARRAY|HASH =item log => LEVEL =item messageId => STRING =item modified => BOOLEAN =item size => INTEGER =item trace => LEVEL =item trusted => BOOLEAN =item unique => STRING =item write_labels => BOOLEAN When a label is changed or its value read, using L, that info should be sent to the IMAP server. But, this action could be superfluous, for instance because the label was already set or clear, and communication is expensive. On the other hand, someone else may use IMAP to make changes in the same folder, and will get the updates too late or never... =back =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 Mail::Box::IMAP4::Message-EB( [$message|$part|$body], $content ) Inherited, see L =item Mail::Box::IMAP4::Message-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 Mail::Box::IMAP4::Message-EB($fh|STRING|SCALAR|ARRAY, %options) Inherited, see L =item $obj-EB(%options) Inherited, see L =item $obj-EB(%options) Inherited, see L =item $obj-EB( [STRING|$field|$address|ARRAY-$of-$things] ) Inherited, see L =item $obj-EB(STRING) =item Mail::Box::IMAP4::Message-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( [$folder] ) 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( [$integer] ) Inherited, see L =item $obj-EB() Returns the size of this message. If the message is still on the remote server, IMAP 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. =item $obj-EB() Inherited, see L =item $obj-EB( [STRING|undef] ) 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