Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

mail::server::imap4::fetch(3pm) [debian man page]

Mail::Server::IMAP4::Fetch(3pm) 			User Contributed Perl Documentation			   Mail::Server::IMAP4::Fetch(3pm)

NAME
Mail::Server::IMAP4::Fetch - message info for IMAP protocol speed-up 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; 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 Mail::Box::Netzwert. The object used here is a simplified representation of a Mail::Box::Message 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 Storable if you want to. METHODS
Constructors Mail::Server::IMAP4::Fetch->new(MESSAGE|PART, OPTIONS) -Option --Default md5checksums 0 md5checksums => BOOLEAN Attributes $obj->bodyLocation() $obj->headLocation() $obj->partLocation() IMAP Commands $obj->fetchBody(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'. $obj->fetchEnvelope() Returns a string representation of some header information. $obj->fetchSize() Returns the size of the message body. $obj->part([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; $obj->printStructure([FILEHANDLE|undef, [NUMBER]]) Print the structure of the fetch data to the specified FILEHANDLE or the selected filehandle. When explicitly "undef" 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); Internals DETAILS
See RFC2060: "Internet Message Access Protocol IMAP4v1" section 7.4.2 RFC2045: "MIME Part One: Format of Internet Message Bodies". SEE ALSO
This module is part of Mail-Box distribution version 2.105, built on May 07, 2012. Website: http://perl.overmeer.net/mailbox/ LICENSE
Copyrights 2001-2012 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 http://www.perl.com/perl/misc/Artistic.html perl v5.14.2 2012-05-07 Mail::Server::IMAP4::Fetch(3pm)

Check Out this Related Man Page

Mail::Box::Tie::HASH(3pm)				User Contributed Perl Documentation				 Mail::Box::Tie::HASH(3pm)

NAME
Mail::Box::Tie::HASH - access an existing message folder as a hash SYNOPSIS
tie my(%inbox), 'Mail::Box::Tie::HASH', $folder; foreach my $msgid (keys %inbox) { print $inbox{$msgid}; delete $inbox{$msgid}; } $inbox{$msg->messageId} = $msg; DESCRIPTION
Certainly when you look at a folder as being a set of related messages based on message-id, it is logical to access the folder through a hash. For a tied hash, the message-id is used as the key. The message-id is usually unique, but when two or more instances of the same message are in the same folder, one will be flagged for deletion and the other will be returned. This implementation uses basic folder access routines which are related to the message-id. METHODS
Constructors TIEHASH('Mail::Box::Tie::HASH', FOLDER) Connects the FOLDER object to a HASH. example: my $mgr = Mail::Box::Manager->new; my $folder = $mgr->open(access => 'rw'); tie my(%inbox), 'Mail::Box::Tie::HASH', $folder; Tied Interface $obj->CLEAR() Remove the contents of the hash. This is not really possible, but all the messages will be flagged for deletion. example: %inbox = (); %inbox = ($msg->messageId, $msg); #before adding msg $obj->DELETE(MESSAGE-ID) Remove the message with the specified MESSAGE-ID. example: delete $inbox{$msgid}; $obj->EXISTS(MESSAGE-ID) Check whether a message with a certain MESSAGE-ID exists. example: if(exists $inbox{$msgid}) ... $obj->FETCH(MESSAGEID) Get the message with the specified id. The returned message may be a dummy if message thread detection is used. Returns "undef" when there is no message with the specified id. example: my $msg = $inbox{$msgid}; if($inbox{$msgid}->isDummy) ... $obj->FIRSTKEY() See NEXTKEY(). $obj->NEXTKEY(PREVIOUS) FIRSTKEY() returns the first message-id/message pair from the folder, and NEXTKEY returns the message-id/message pair for the next message, in the order in which the message is stored in the folder. Messages flagged for deletion will not be returned. See the Mail::Box::messages() method of the folder type for more information about the folder message order. example: foreach my $msgid (keys %inbox) ... foreach my $msg (values %inbox) ... while(my ($msgid, $msg) = each %inbox) { $msg->print unless $msg->isDeleted; } $obj->STORE(undef, MESSAGE) Store a message in the folder. The key must be "undef", because the message-id of the specified message is taken. This is shown in the first example. However, as you see, it is a bit complicated to specify "undef", therefore the string "undef" is accepted as well. The message may be converted into something which can be stored in the folder type which is at stake. The added instance is returned. example: $inbox{ (undef) } = $msg; $inbox{undef} = $msg; SEE ALSO
This module is part of Mail-Box distribution version 2.105, built on May 07, 2012. Website: http://perl.overmeer.net/mailbox/ LICENSE
Copyrights 2001-2012 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 http://www.perl.com/perl/misc/Artistic.html perl v5.14.2 2012-05-07 Mail::Box::Tie::HASH(3pm)
Man Page