METHODS

See METHODS in Mail::Reporter

Constructors

$obj->clone
See clone in Mail::Message::Head::FieldGroup.
$obj->from( [<$head|$message>, %options] )

WARNING: this method has two very different purposes. For backward compatibility reasons, without arguments resentFrom() is called to return the From field of this resent group.

With any arguments, a list of Mail::Message::Head::ResentGroup objects is returned, taken from the specified $message or message $head.

$obj->implementedTypes
$class->implementedTypes
See implementedTypes in Mail::Message::Head::FieldGroup.
$class->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 Defined in Default

Bcc

undef

Cc

undef

Date

<now>

Delivered-To

undef

From

<required>

Message-ID

<uniquely created>

Received

<created>

Return-Path

undef

Sender

undef

To

undef

head

<created automatically>

log

Mail::Reporter

'WARNINGS'

message_head

undef

software

Mail::Message::Head::FieldGroup

undef

trace

Mail::Reporter

'WARNINGS'

type

Mail::Message::Head::FieldGroup

undef

version

Mail::Message::Head::FieldGroup

undef

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.
Delivered-To => STRING|FIELD
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. If it is not defined, one is created using createReceived().
Return-Path => STRING|FIELD
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 the data is stored in. By default a Mail::Message::Head::Partial is created for you.
log => LEVEL
message_head => HEAD
The real header of the message where this resent group is part of. The head used in this class is only a container for a subset of fields.
software => STRING
trace => LEVEL
type => STRING
version => STRING
» Error: Message header required for creation of ResentGroup.

It is required to know to which header the resent-group is created. Use the head option. Maybe you should use Mail::Message::Head::Complete::addResentGroup() with DATA, which will organize the correct initiations for you.

The header

$obj->add( <$field, $value> | $object )

All fields appear only once, so add() behaves as set().

$obj->addFields( [$fieldnames] )

Not applicable to resent-groups: the same name can appear in more than one group. Therefore, a FIELDNAME is sufficiently distinctive.

$obj->attach( $head )
See attach in Mail::Message::Head::FieldGroup.
$obj->delete
See delete in Mail::Message::Head::FieldGroup.
$obj->fieldNames
See fieldNames in Mail::Message::Head::FieldGroup.
$obj->fields
See fields in Mail::Message::Head::FieldGroup.
$obj->messageHead( [$head] )

Returns (optionally after setting) the real header where this resent group belongs to. This may be undef at creation, and then later filled in when Mail::Message::Head::Complete::addResentGroup() is called.

$obj->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, Delivered-To, and Received must come first. Only fields mentioned in the RFC are returned.

$obj->set( <$field, $value> | $object )

Set a $field to a (new) $value. The $field names which do not start with 'Resent-*' but need it will have that added. It is also an option to specify a fully prepared message field $object. In any case, a field $object is returned.

» Example:
 my $this = Mail::Message::Head::ResentGroup->new;
 $this->set(To => 'fish@tux.aq');
 $msg->addResentGroup($this);
 $msg->send;

 $msg->bounce(To => 'fish@tux.aq')->send;   # the same

 my $this = Mail::Message::Head::ResentGroup
     ->new(To => 'fish@tux.aq');

Access to the header

$obj->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).

$obj->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.

$obj->date

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

$obj->dateTimestamp

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

$obj->deliveredTo

The field which describes the Delivered-To of this resent group.

$obj->destinations

Returns a list of all addresses specified in the Resent-To, -Cc, and -Bcc fields of this resent group.

$obj->isResentGroupFieldName( $name )
$class->isResentGroupFieldName( $name )
$obj->messageId

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

$obj->received

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

$obj->receivedTimestamp

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

$obj->resentFrom

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.

For reasons of backward compatibility and consistency, the from() method will return the same as this method.

$obj->returnPath

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

$obj->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.

$obj->software
See software in Mail::Message::Head::FieldGroup.
$obj->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.

$obj->type
See type in Mail::Message::Head::FieldGroup.
$obj->version
See version in Mail::Message::Head::FieldGroup.

Internals

$obj->collectFields( [$name] )
See collectFields in Mail::Message::Head::FieldGroup.
$obj->createReceived( [$domain] )

Create a received field for this resent group. This is automatically called if none was specified during creation of this resent group object.

The content of this field is described in RFC2821 section 4.4. It could use some improvement.

$obj->detected( $type, $software, $version )
See detected in Mail::Message::Head::FieldGroup.

Error handling

$obj->AUTOLOAD
See AUTOLOAD in Mail::Reporter.
$obj->addReport( $object )
See addReport in Mail::Reporter.
$obj->defaultTrace( [$level]|[$loglevel, $tracelevel]|[$level, $callback] )
$class->defaultTrace( [$level]|[$loglevel, $tracelevel]|[$level, $callback] )
See defaultTrace in Mail::Reporter.
$obj->details
See details in Mail::Message::Head::FieldGroup.
$obj->errors
See errors in Mail::Reporter.
$obj->log( [$level, [$strings]] )
$class->log( [$level, [$strings]] )
See log in Mail::Reporter.
$obj->logPriority( $level )
$class->logPriority( $level )
See logPriority in Mail::Reporter.
$obj->logSettings
See logSettings in Mail::Reporter.
$obj->notImplemented
See notImplemented in Mail::Reporter.
$obj->print( [$fh] )
See print in Mail::Message::Head::FieldGroup.
$obj->report( [$level] )
See report in Mail::Reporter.
$obj->reportAll( [$level] )
See reportAll in Mail::Reporter.
$obj->trace( [$level] )
See trace in Mail::Reporter.
$obj->warnings
See warnings in Mail::Reporter.

Cleanup

$obj->DESTROY
See DESTROY in Mail::Reporter.