NAME
Mail::Message::Head::ResentGroup - header fields tracking message delivery
INHERITANCE
Mail::Message::Head::ResentGroup
is a Mail::Message::Head::FieldGroup
is a Mail::Reporter
SYNOPSIS
use Mail::Message::Head::ResentGroup;
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 fields which describe one 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!
Extends "DESCRIPTION" in Mail::Message::Head::FieldGroup.
METHODS
Extends "METHODS" in Mail::Message::Head::FieldGroup.
Constructors
Extends "Constructors" in Mail::Message::Head::FieldGroup.
- $obj->clone()
-
Inherited, see "Constructors" 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
Fromfield of this resent group.With any arguments, a list of
Mail::Message::Head::ResentGroupobjects is returned, taken from the specified$messageor message$head. Improves base, see "Constructors" in Mail::Message::Head::FieldGroup - $any->implementedTypes()
-
Inherited, see "Constructors" in Mail::Message::Head::FieldGroup
- $class->new( [@fields], %options )
-
Create an object which maintains one set of resent headers. The
@fieldsare Mail::Message::Field objects from the same header.All
%optionswhich start with capitals will be used to construct additional fields. These option names are prepended withResent-*, keeping the capitization of what is specified. Improves base, see "Constructors" in Mail::Message::Head::FieldGroup-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 => $text|$field|\@fields
- Cc => $text|$field|\@fields
- Date => $date
-
When this resent-group is dispatched by the resender of the message. Like the
Datefield, it is not the date and time that the message was actually transported. - Delivered-To => $text|$field
- From => $text|$field|\@fields
- Message-ID => $text|$field
-
The
Resent-Message-IDwhich identifies this resent group. The FIELD must contain a message id. - Received => $text
-
The
Receivedfield is the starting line for a resent group of header lines. If it is not defined, one is created using createReceived(). - Return-Path => $text|$field
- Sender => $text|$field
-
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 => $text|$field|\@fields
- head => $head
-
The
$headobject where the data is stored in. By default a Mail::Message::Head::Partial is created for you. - log => LEVEL
- message_head => $head
-
The real
$headof the message where this resent group is part of. Theheadused in this class is only a container for a subset of fields. - software => STRING
- trace => LEVEL
- type => STRING
- version => STRING
Attributes
Extends "Attributes" in Mail::Message::Head::FieldGroup.
- $obj->logSettings()
-
Inherited, see "Attributes" in Mail::Reporter
The header
Extends "The header" in Mail::Message::Head::FieldGroup.
- $obj->add( <$field, $value> | $object )
-
All fields appear only once, so
add()behaves as set(). Improves base, see "The header" in Mail::Message::Head::FieldGroup - $obj->addFields( [$fieldnames] )
-
Not applicable to resent-groups: the same name can appear in more than one group. Therefore, a FIELDNAME is sufficiently distinctive. Improves base, see "The header" in Mail::Message::Head::FieldGroup
- $obj->attach($head)
-
Inherited, see "The header" in Mail::Message::Head::FieldGroup
- $obj->delete()
-
Inherited, see "The header" in Mail::Message::Head::FieldGroup
- $obj->fieldNames()
-
Inherited, see "The header" in Mail::Message::Head::FieldGroup
- $obj->fields()
-
Inherited, see "The header" in Mail::Message::Head::FieldGroup
- $obj->head()
-
Inherited, see "The header" in Mail::Message::Head::FieldGroup
- $obj->messageHead( [$head] )
-
Returns (optionally after setting) the real header where this resent group belongs to. This may be
undefat 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 theReturn-Path,Delivered-To, andReceivedmust come first. Only fields mentioned in the RFC are returned. - $obj->set( <$field, $value> | $object )
-
Set a
$fieldto a (new)$value. The$fieldnames 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$objectis returned.» example:
my $rg = Mail::Message::Head::ResentGroup->new; $rg->set(To => 'fish@tux.aq'); $msg->addResentGroup($rg); $msg->send; $msg->bounce(To => 'fish@tux.aq')->send; # the same my $rg = Mail::Message::Head::ResentGroup->new(To => 'fish@tux.aq');
Access to the header
Extends "Access to the header" in Mail::Message::Head::FieldGroup.
- $obj->bcc()
-
In scalar context, the
Resent-Bccfield 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-Ccfield is returned. In list context, the addresses as specified within the cc field are returned as Mail::Address objects. - $obj->date()
-
Returns the
Resent-Datefield, orundefif it was not defined. - $obj->dateTimestamp()
-
The timestamp as stored within the
Resent-Datefield converted to local system time. - $obj->deliveredTo()
-
The field which describes the
Delivered-Toof this resent group. - $obj->destinations()
-
Returns a list of all addresses specified in the
Resent-To,-Cc, and-Bccfields of this resent group. - $any->isResentGroupFieldName($name)
- $obj->messageId()
-
Returns the message-ID used for this group of resent lines.
- $obj->received()
-
The field which describes the
Receiveddata of this resent group. - $obj->receivedTimestamp()
-
The timestamp as stored within the
Receivedfield converted to local system time. - $obj->resentFrom()
-
In scalar context, the
Resent-Fromfield 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-Pathof this resent group. - $obj->sender()
-
In scalar context, the
Resent-Senderfield is returned. In list context, the addresses as specified within the from field are returned as Mail::Address objects. - $obj->software()
-
Inherited, see "Access to the header" in Mail::Message::Head::FieldGroup
- $obj->to()
-
In scalar context, the
Resent-Tofield is returned. In list context, the addresses as specified within the to field are returned as Mail::Address objects. - $obj->type()
-
Inherited, see "Access to the header" in Mail::Message::Head::FieldGroup
- $obj->version()
-
Inherited, see "Access to the header" in Mail::Message::Head::FieldGroup
Internals
Extends "Internals" in Mail::Message::Head::FieldGroup.
- $obj->collectFields( [$name] )
-
Inherited, see "Internals" 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)
-
Inherited, see "Internals" in Mail::Message::Head::FieldGroup
Error handling
Extends "Error handling" in Mail::Message::Head::FieldGroup.
- $obj->AUTOLOAD()
-
Inherited, see "Error handling" in Mail::Reporter
- $obj->addReport($object)
-
Inherited, see "Error handling" in Mail::Reporter
- $any->defaultTrace( [$level]|[$loglevel, $tracelevel]|[$level, $callback] )
-
Inherited, see "Error handling" in Mail::Reporter
- $obj->details()
-
Inherited, see "Error handling" in Mail::Message::Head::FieldGroup
- $obj->errors()
-
Inherited, see "Error handling" in Mail::Reporter
- $any->log( [$level, [$strings]] )
-
Inherited, see "Error handling" in Mail::Reporter
- $any->logPriority($level)
-
Inherited, see "Error handling" in Mail::Reporter
- $obj->notImplemented()
-
Inherited, see "Error handling" in Mail::Reporter
- $obj->print( [$fh] )
-
Inherited, see "Error handling" in Mail::Message::Head::FieldGroup
- $obj->report( [$level] )
-
Inherited, see "Error handling" in Mail::Reporter
- $obj->reportAll( [$level] )
-
Inherited, see "Error handling" in Mail::Reporter
- $obj->trace( [$level] )
-
Inherited, see "Error handling" in Mail::Reporter
- $obj->warnings()
-
Inherited, see "Error handling" in Mail::Reporter
Cleanup
Extends "Cleanup" in Mail::Message::Head::FieldGroup.
- $obj->DESTROY()
-
Inherited, see "Cleanup" in Mail::Reporter
DIAGNOSTICS
- Error: Message header required for creation of ResentGroup.
-
It is required to know to which header the resent-group is created. Use the
headoption. Maybe you should use Mail::Message::Head::Complete::addResentGroup() with DATA, which will organize the correct initiations for you. Cast bynew() - Error: Package $package does not implement $method.
-
Fatal error: the specific package (or one of its superclasses) does not implement this method where it should. This message means that some other related classes do implement this method however the class at hand does not. Probably you should investigate this and probably inform the author of the package. Cast by
notImplemented()
SEE ALSO
This module is part of Mail-Message version 3.020, built on December 08, 2025. Website: http://perl.overmeer.net/CPAN/
LICENSE
For contributors see file ChangeLog.
This software is copyright (c) 2001-2025 by Mark Overmeer.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.