=encoding utf8 =head1 NAME Mail::Box::File::Message - one message in a Mbox folder =head1 INHERITANCE Mail::Box::File::Message is a Mail::Box::Message is a Mail::Message is a Mail::Reporter Mail::Box::File::Message is extended by Mail::Box::Dbx::Message Mail::Box::Mbox::Message =head1 SYNOPSIS my $folder = new Mail::Box::File folder => $ENV{MAIL}, ...; my $message = $folder->message(0); =head1 DESCRIPTION Maintain one message in an file based folder, any L extension. Extends L<"DESCRIPTION" in Mail::Box::Message|Mail::Box::Message/"DESCRIPTION">. =head1 METHODS Extends L<"METHODS" in Mail::Box::Message|Mail::Box::Message/"METHODS">. =head2 Constructors Extends L<"Constructors" in Mail::Box::Message|Mail::Box::Message/"Constructors">. =over 4 =item $obj-EB(%options) Inherited, see L =item Mail::Box::File::Message-EB(%options) Messages in file-based folders use the following options for creation: -Option --Defined in --Default body Mail::Message undef body_type Mail::Box::Message deleted Mail::Message field_type Mail::Message undef folder Mail::Box::Message from_line undef 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 =over 2 =item body => OBJECT =item body_type => CODE|CLASS =item deleted => BOOLEAN =item field_type => CLASS =item folder => FOLDER =item from_line => STRING The line which begins each message in the file. Some people detest this line, but this is just how things were invented... =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 =back =back =head2 Constructing a message Extends L<"Constructing a message" in Mail::Box::Message|Mail::Box::Message/"Constructing a message">. =over 4 =item $obj-EB( [<$rg_object|%options>] ) Inherited, see L =item Mail::Box::File::Message-EB( [$message|$part|$body], $content ) Inherited, see L =item Mail::Box::File::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::File::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::File::Message-EB(STRING) Inherited, see L =back =head2 The message Extends L<"The message" in Mail::Box::Message|Mail::Box::Message/"The message">. =over 4 =item $obj-EB() Inherited, see L =item $obj-EB($folder, %options) Inherited, see L =item $obj-EB() Mbox folders contain multiple messages in one file, using a separator line to keep them apart. Typically, these lines start with "From ". Lines within the message could interfere with this separator, and should therefore be translated. This method will return the escaped text of the body as reference. =item $obj-EB( [$folder] ) Inherited, see L =item $obj-EB( [$line] ) Many people detest file-style folders because they store messages all in one file, where a line starting with C leads the header. If we receive a message from a file-based folder, we store that line. If we write to such a file, but there is no such line stored, then we try to generate one. If $line is provided, then the starting line is set to this value. =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() Inherited, see L =item $obj-EB() Inherited, see L =item $obj-EB( [$fh] ) Write one message to a file handle. It is the message including the leading 'From ' line and trailing blank. The From-line may interfere with lines in the body: those lines are escaped with an extra '>'. example: $msg->write(\*FILE); # print the message with encaps to FILE $msg->write; # message with encaps to selected filehandle $msg->print(\*FILE); # the message without encaps. =back =head2 The header Extends L<"The header" in Mail::Box::Message|Mail::Box::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::Message|Mail::Box::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::Message|Mail::Box::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