
=head1 NAME

Mail::Message::Body::File - body of a message temporarily stored in a file

=head1 CLASS INHERITANCE

 Mail::Message::Body::File
   is a Mail::Message::Body
   is a Mail::Reporter

=head1 SYNOPSIS

 See Mail::Message::Body

=head1 DESCRIPTION

The body (content) of a message can be stored in various ways.  In this
documentation you find the description of extra functionality you have
when a message is stored in a file.

Storing a whole message is a file is useful when the body is large.  Although
access through a file is slower, it is saving a lot of memory.

=head1 METHODS

=head2 Initiation

=over 4

=item B<new> OPTIONS

(Class method)

 OPTION               DEFAULT
 based_on             undef
 charset              'us-ascii'
 checked              <false>
 data                 undef
 disposition          undef
 eol                  'NATIVE'
 file                 undef
 log                  'WARNINGS'
 message              undef
 mime_type            'text/plain'
 modified             <false>
 trace                'WARNINGS'
 transfer_encoding    'NONE'

=over 4

=item B<based_on> =E<gt> BODY

See Mail::Message::Body::new(based_on)

=item B<charset> =E<gt> STRING

See Mail::Message::Body::new(charset)

=item B<checked> =E<gt> BOOLEAN

See Mail::Message::Body::new(checked)

=item B<data> =E<gt> ARRAY-OF-LINES | STRING

See Mail::Message::Body::new(data)

=item B<disposition> =E<gt> STRING|FIELD

See Mail::Message::Body::new(disposition)

=item B<eol> =E<gt> 'CR'|'LF'|'CRLF'|'NATIVE'

See Mail::Message::Body::new(eol)

=item B<file> =E<gt> FILENAME|FILEHANDLE|IOHANDLE

See Mail::Message::Body::new(file)

=item B<log> =E<gt> LEVEL

See Mail::Reporter::new(log)

=item B<message> =E<gt> MESSAGE

See Mail::Message::Body::new(message)

=item B<mime_type> =E<gt> STRING|FIELD|MIME

See Mail::Message::Body::new(mime_type)

=item B<modified> =E<gt> BOOLEAN

See Mail::Message::Body::new(modified)

=item B<trace> =E<gt> LEVEL

See Mail::Reporter::new(trace)

=item B<transfer_encoding> =E<gt> STRING|FIELD

See Mail::Message::Body::new(transfer_encoding)

=back

=back

=head2 The Body

=over 4

=item B<clone> 

See Mail::Message::Body::clone()

=item B<decoded> OPTIONS

See Mail::Message::Body::decoded()

=item B<isDelayed> 

See Mail::Message::Body::isDelayed()

=item B<isModified> 

See Mail::Message::Body::isModified()

=item B<isMultipart> 

See Mail::Message::Body::isMultipart()

=item B<isNested> 

See Mail::Message::Body::isNested()

=item B<message> [MESSAGE]

See Mail::Message::Body::message()

=item B<modified> [BOOLEAN]

See Mail::Message::Body::modified()

=item B<print> [FILEHANDLE]

See Mail::Message::Body::print()

=item B<printEscapedFrom> FILEHANDLE

See Mail::Message::Body::printEscapedFrom()

=back

=head2 About the Payload

=over 4

=item B<charset> 

See Mail::Message::Body::charset()

=item B<checked> [BOOLEAN]

See Mail::Message::Body::checked()

=item B<disposition> [STRING|FIELD]

See Mail::Message::Body::disposition()

=item B<eol> ['CR'|'LF'|'CRLF'|'NATIVE']

See Mail::Message::Body::eol()

=item B<isBinary> 

See Mail::Message::Body::Encode::isBinary()

=item B<isText> 

See Mail::Message::Body::Encode::isText()

=item B<mimeType> 

See Mail::Message::Body::mimeType()

=item B<nrLines> 

See Mail::Message::Body::nrLines()

=item B<size> 

See Mail::Message::Body::size()

=item B<transferEncoding> [STRING|FIELD]

See Mail::Message::Body::transferEncoding()

=item B<type> 

See Mail::Message::Body::type()

=back

=head2 Access to the Payload

=over 4

=item B<file> 

See Mail::Message::Body::file()

=item B<lines> 

See Mail::Message::Body::lines()

=item B<string> 

See Mail::Message::Body::string()

=back

=head2 Constructing a Body

=over 4

=item B<addTransferEncHandler> NAME, CLASS|OBJECT

See Mail::Message::Body::Encode::addTransferEncHandler()

=item B<attach> MESSAGES, OPTIONS

See Mail::Message::Body::Construct::attach()

=item B<check> 

See Mail::Message::Body::Encode::check()

=item B<concatenate> COMPONENTS

See Mail::Message::Body::Construct::concatenate()

=item B<encode> OPTIONS

See Mail::Message::Body::Encode::encode()

=item B<encoded> 

See Mail::Message::Body::Encode::encoded()

=item B<foreachLine> CODE

See Mail::Message::Body::Construct::foreachLine()

=item B<getTransferEncHandler> TYPE

See Mail::Message::Body::Encode::getTransferEncHandler()

=item B<stripSignature> OPTIONS

See Mail::Message::Body::Construct::stripSignature()

=item B<unify> BODY

See Mail::Message::Body::Encode::unify()

=back

=head2 Reading and Writing [internals]

=over 4

=item B<AUTOLOAD> 

See Mail::Message::Body::AUTOLOAD()

=item B<DESTROY> 

The temporary file is automatically removed when the body is
not required anymore.

=item B<fileLocation> [BEGIN,END]

See Mail::Message::Body::fileLocation()

=item B<load> 

See Mail::Message::Body::load()

=item B<moveLocation> [DISTANCE]

See Mail::Message::Body::moveLocation()

=item B<read> PARSER, HEAD, BODYTYPE [,CHARS [,LINES]]

See Mail::Message::Body::read()

=item B<tempFilename> [FILENAME]

Returns the name of the temporary file which is used to store this body.

=back

=head2 Logging and Tracing

=over 4

=item B<defaultTrace> [LEVEL, [LEVEL]

See Mail::Reporter::defaultTrace()

=item B<errors> 

See Mail::Reporter::errors()

=item B<log> [LEVEL [,STRINGS]]

See Mail::Reporter::log()

=item B<report> [LEVEL]

See Mail::Reporter::report()

=item B<reportAll> [LEVEL]

See Mail::Reporter::reportAll()

=item B<trace> [LEVEL]

See Mail::Reporter::trace()

=item B<warnings> 

See Mail::Reporter::warnings()

=back

=head2 Other Methods

=over 4

=item B<inGlobalDestruction> 

See Mail::Reporter::inGlobalDestruction()

=item B<logPriority> LEVEL

See Mail::Reporter::logPriority()

=item B<logSettings> 

See Mail::Reporter::logSettings()

=item B<notImplemented> 

See Mail::Reporter::notImplemented()

=back

=head1 SEE ALSO

A good start to read is Mail::Box-Overview.
More documentation and a mailinglist are available from the project's
website at L<http://perl.overmeer.net/mailbox/>.

=head1 AUTHOR

Written by Mark Overmeer (L<mark@overmeer.net|mailto:mark@overmeer.net>)
with the help of many.  See the ChangeLog for details.

=head1 VERSION

This code is beta, version 2.037.

Copyright (c) 2001-2003 by the authors. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.
