1Mail::Server::IMAP4::FeUtscehr(3C)ontributed Perl DocumeMnatialt:i:oSnerver::IMAP4::Fetch(3)
2
3
4

NAME

6       Mail::Server::IMAP4::Fetch - message info for IMAP protocol speed-up
7

SYNOPSIS

9        my $imap = Mail::Server::IMAP4::Fetch->new($msg);
10        print $imap->fetchBody(1);   # for FETCH BODYSTRUCTURE
11        print $imap->fetchBody;      # for FETCH BODY
12        print $imap->fetchEnvelope;  # for FETCH ENVELOPE
13        print $imap->fetchSize;
14

DESCRIPTION

16       Create a new object hierarchy, which contains information to capture
17       the most important details about the message.  The object can be used
18       to speed-up IMAP-server implementations, as Mail::Box::Netzwert.
19
20       The object used here is a simplified representation of a
21       Mail::Box::Message object.  It does not maintain headers and does not
22       refer to the folder.  It only works with messages stored in a file.
23       Therefore, this object can be frozen by Storable if you want to.
24

METHODS

26   Constructors
27       Mail::Server::IMAP4::Fetch->new( <$message|$part>, %options )
28            -Option      --Default
29             md5checksums  0
30
31           md5checksums => BOOLEAN
32
33   Attributes
34       $obj->bodyLocation()
35       $obj->headLocation()
36       $obj->partLocation()
37
38   IMAP Commands
39       $obj->fetchBody($extended)
40           Returns one string, representing the message's structure as defined
41           by the IMAP protocol.  The boolean argument indicates whether you
42           like to have the $extended information, as the imap command 'FETCH
43           BODYSTRUCTURE' defines or the limited information of 'FETCH BODY'.
44
45       $obj->fetchEnvelope()
46           Returns a string representation of some header information.
47
48       $obj->fetchSize()
49           Returns the size of the message body.
50
51       $obj->part( [$partnr] )
52           The partnummer is a list of dot-separated positive integers,
53           numbering (nested) parts in multi-part message bodies.  By default,
54           the info of the main message is returned.
55
56           example:
57
58            my $partinfo = $msg->info->part('1.2.1');
59            print $msg->info->part('3.3')->fetchBody;
60
61       $obj->printStructure( [<$fh|undef>, [$number]] )
62           Print the structure of the fetch data to the specified $fh or the
63           selected filehandle.  When explicitly "undef" is specified as
64           handle, then the output will be returned as string.  Only a limited
65           set of the information is displayed.
66
67           example:
68
69            my $imap = ...;
70            $imap->printStructure(\*OUTPUT);
71            $imap->printStructure;
72            my $struct = $imap->printStructure(undef);
73
74   Internals

DETAILS

76       See
77
78       RFC2060: "Internet Message Access Protocol IMAP4v1" section 7.4.2
79       RFC2045: "MIME Part One: Format of Internet Message Bodies".
80

SEE ALSO

82       This module is part of Mail-Box-IMAP4 distribution version 3.007, built
83       on June 13, 2019. Website: http://perl.overmeer.net/CPAN/
84

LICENSE

86       Copyrights 2001-2019 by [Mark Overmeer]. For other contributors see
87       ChangeLog.
88
89       This program is free software; you can redistribute it and/or modify it
90       under the same terms as Perl itself.  See http://dev.perl.org/licenses/
91
92
93
94perl v5.32.1                      2021-01-27     Mail::Server::IMAP4::Fetch(3)
Impressum