NAME

Mail::Message::Head::ResentGroup - a group of header fields about resending

CLASS INHERITANCE

Mail::Message::Head::ResentGroup is a Mail::Reporter

SYNOPSIS

my $rg = Mail::Message::Head::ResentGroup->new(head => $head,
   From => 'me@home.nl', To => 'You@tux.aq');
$head->addResentGroup($rg);

my $rg = $head->addResentGroup(From => 'me');

my @from = $rg->From;

my @rgs = $head->resentGroups;
$rg[2]->delete if @rgs > 2;

DESCRIPTION

A resent group is a set of header lines which describe a intermediate step in the message transport. Resent groups have NOTHING to do with user activety; there is no relation to the user's sense of creating reply, forward or bounce messages at all!

METHODS

Initiation

new [FIELDS], OPTIONS

Create an object which maintains one set of resent headers. The FIELDS are Mail::Message::Field objects from the same header.

OPTIONS which start with capitals will be used to construct additional fields. These option names are prepended with Resent-, keeping the capitization of what is specified.

OPTION               DEFAULT
Bcc                  undef
Cc                   undef
Date                 <now>
From                 <required>
Message-ID           <uniquely created>
Received             <required>
Sender               undef
To                   undef
head                 <required>
log                  'WARNINGS'
trace                'WARNINGS'
Bcc => STRING|OBJECT|OBJECTS
Cc => STRING|OBJECT|OBJECTS
Date => STRING

When this resent-group is dispatched by the resender of the message. Like the Date field, it is not the date and time that the message was actually transported.

From => STRING|OBJECT|OBJECTS
Message-ID => STRING|FIELD

The Resent-Message-ID which identifies this resent group. The FIELD must contain a message id.

Received => STRING

The Received field is the starting line for a resent group of header lines, therefore it is obligatory.

Sender => STRING|OBJECT

Only permitted when more than one from address is specified. In this case, it selects one of these addresses as the main originator of the message.

To => STRING|OBJECT|OBJECTS
head => OBJECT

The header where this resent group belongs to.

log => LEVEL

See Mail::Reporter::new(log)

trace => LEVEL

See Mail::Reporter::new(trace)

The Header

delete

Remove all the header lines which are combined in this resent group from the header.

Access to the Header

bcc

In scalar context, the Resent-Bcc field is returned. In list context, the addresses as specified within the bcc field are returned as Mail::Address objects. Bcc fields are not transmitted (hidden for external parties).

cc

In scalar context, the Resent-Cc field is returned. In list context, the addresses as specified within the cc field are returned as Mail::Address objects.

date

Returns the Resent-Date field, or undef if it was not defined.

dateTimestamp

The timestamp as stored within the Resent-Date field converted to local system time.

from

In scalar context, the Resent-From field is returned. In list context, the addresses as specified within the from field are returned as Mail::Address objects.

messageId

Returns the message-ID used for this group of resent lines.

received

The field which describes the Received data of this resent group.

receivedTimestamp

The timestamp as stored within the Received field converted to local system time.

returnPath

The field which describes the Return-Path of this resent group.

sender

In scalar context, the Resent-Sender field is returned. In list context, the addresses as specified within the from field are returned as Mail::Address objects.

to

In scalar context, the Resent-To field is returned. In list context, the addresses as specified within the to field are returned as Mail::Address objects.

Reading and Writing [internals]

orderedFields

Returns the fields in the order as should appear in header according to rfc2822. For the Resent- fields of the group, the order is not that important, but the Return-Path and Received must come first. Only fields mentioned in the RFC are returned.

Logging and Tracing

defaultTrace [LEVEL, [LEVEL]

See Mail::Reporter::defaultTrace()

errors

See Mail::Reporter::errors()

log [LEVEL [,STRINGS]]

See Mail::Reporter::log()

report [LEVEL]

See Mail::Reporter::report()

reportAll [LEVEL]

See Mail::Reporter::reportAll()

trace [LEVEL]

See Mail::Reporter::trace()

warnings

See Mail::Reporter::warnings()

Other Methods

AUTOLOAD

See Mail::Reporter::AUTOLOAD()

DESTROY

See Mail::Reporter::DESTROY()

inGlobalDestruction

See Mail::Reporter::inGlobalDestruction()

logPriority LEVEL

See Mail::Reporter::logPriority()

logSettings

See Mail::Reporter::logSettings()

notImplemented

See Mail::Reporter::notImplemented()

SEE ALSO

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

AUTHOR

Mark Overmeer (mark@overmeer.net) with the help of many.

VERSION

This code is beta, version 2.022.

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