
=head1 NAME

Mail::Message::Head::Delayed - a not-read header of a Mail::Message

=head1 CLASS INHERITANCE

 Mail::Message::Head::Delayed realizes a Mail::Message::Head::Complete

 Mail::Message::Head::Delayed
   is a Mail::Message::Head
   is a Mail::Reporter

=head1 SYNOPSIS

 my Mail::Message::Head::Delayed $delayed = ...;
 $delayed->isa('Mail::Message::Head')  # true
 $delayed->guessBodySize               # undef
 $delayed->isDelayed                   # true

=head1 DESCRIPTION

This object is used as place-holder, to be replaced
by a Mail::Message::Head when someone accesses the header of a message.

=head1 METHODS

=head2 Initiation

=over 4

=item B<build> FIELDS

You cannot create a delayed header with fields.

=item B<new> OPTIONS

(Class method)

 OPTION               DEFAULT
 field_type           'Mail::Message::Field::Fast'
 log                  'WARNINGS'
 message              undef
 modified             <false>
 trace                'WARNINGS'

=over 4

=item B<field_type> =E<gt> CLASS

See Mail::Message::Head::new(field_type)

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

See Mail::Reporter::new(log)

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

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

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

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

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

See Mail::Reporter::new(trace)

=back

=back

=head2 The Header

=over 4

=item B<clone> [FIELDS]

See Mail::Message::Head::Complete::clone()

=item B<isDelayed> 

See Mail::Message::Head::isDelayed()

=item B<isEmpty> 

See Mail::Message::Head::isEmpty()

=item B<isModified> 

See Mail::Message::Head::isModified()

=item B<isMultipart> 

See Mail::Message::Head::isMultipart()

=item B<message> [MESSAGE]

See Mail::Message::Head::message()

=item B<modified> [BOOLEAN]

See Mail::Message::Head::modified()

=back

=head2 Constructing a Header

=over 4

=item B<add> FIELD | LINE | (NAME,BODY[,ATTRS])

See Mail::Message::Head::Complete::add()

=item B<delete> NAME

See Mail::Message::Head::Complete::delete()

=item B<removeField> FIELD

See Mail::Message::Head::Complete::removeField()

=item B<reset> NAME, FIELDS

See Mail::Message::Head::Complete::reset()

=item B<set> FIELD | LINE | (NAME, BODY [,ATTRS])

See Mail::Message::Head::Complete::set()

=back

=head2 Access to the Header

=over 4

=item B<addResentGroup> RESENT-GROUP|DATA

See Mail::Message::Head::Complete::addResentGroup()

=item B<count> NAME

See Mail::Message::Head::Complete::count()

=item B<get> NAME [,INDEX]

Get the information about the header line NAME.  Realization will
take place.

=item B<grepNames> [NAMES|ARRAY-OF-NAMES|REGEXS]

See Mail::Message::Head::Complete::grepNames()

=item B<guessBodySize> 

On a delayed head, this retuns C<undef>, because when there is no header
there is also no body.

For messages in directory or network organized folders,
Mail::Message::size() usually will give a figure for the whole message
without much cost.  Subtract a few hundred bytes for the header, and you
will get a good estimate.

=item B<guessTimeStamp> 

Make a guess about when the message was origanally posted.
On a delayed head, this returns C<undef>.
For messages in directory or network organized folders,
Mail::Message::timestamp() usually will give a figure without much cost.

=item B<knownNames> 

See Mail::Message::Head::knownNames()

=item B<names> 

See Mail::Message::Head::Complete::names()

=item B<nrLines> 

See Mail::Message::Head::Complete::nrLines()

=item B<print> [FILEHANDLE]

See Mail::Message::Head::Complete::print()

=item B<printUndisclosed> [FILEHANDLE]

See Mail::Message::Head::Complete::printUndisclosed()

=item B<resentGroups> 

See Mail::Message::Head::Complete::resentGroups()

=item B<size> 

See Mail::Message::Head::Complete::size()

=item B<string> 

See Mail::Message::Head::Complete::string()

=item B<timestamp> 

See Mail::Message::Head::Complete::timestamp()

=back

=head2 Reading and Writing [internals]

=over 4

=item B<addNoRealize> FIELD

See Mail::Message::Head::addNoRealize()

=item B<addOrderedFields> FIELDS

See Mail::Message::Head::addOrderedFields()

=item B<createFromLine> 

See Mail::Message::Head::Complete::createFromLine()

=item B<createMessageId> 

See Mail::Message::Head::Complete::createMessageId()

=item B<fileLocation> 

See Mail::Message::Head::fileLocation()

=item B<load> 

See Mail::Message::Head::load()

=item B<messagIdPrefix> [STRING]

See Mail::Message::Head::Complete::messagIdPrefix()

=item B<moveLocation> DISTANCE

See Mail::Message::Head::moveLocation()

=item B<orderedFields> 

See Mail::Message::Head::orderedFields()

=item B<read> PARSER

See Mail::Message::Head::read()

=item B<setNoRealize> FIELD

See Mail::Message::Head::setNoRealize()

=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<AUTOLOAD> 

See Mail::Reporter::AUTOLOAD()

=item B<DESTROY> 

See Mail::Reporter::DESTROY()

=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.
