=encoding utf8 =head1 NAME Mail::Message::Head::ResentGroup - header fields tracking message delivery =head1 INHERITANCE Mail::Message::Head::ResentGroup is a Mail::Message::Head::FieldGroup is a Mail::Reporter =head1 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; =head1 DESCRIPTION A I is a set of header fields which describe one intermediate step in the message transport. Resent groups B with user activety; there is no relation to the C sense of creating reply, forward, or bounce messages at all! Extends L<"DESCRIPTION" in Mail::Message::Head::FieldGroup|Mail::Message::Head::FieldGroup/"DESCRIPTION">. =head1 METHODS Extends L<"METHODS" in Mail::Message::Head::FieldGroup|Mail::Message::Head::FieldGroup/"METHODS">. =head2 Constructors Extends L<"Constructors" in Mail::Message::Head::FieldGroup|Mail::Message::Head::FieldGroup/"Constructors">. =over 4 =item $obj-EB() Inherited, see L =item $obj-EB( [<$head|$message>, %options] ) WARNING: this method has two very different purposes. For backward compatibility reasons, without arguments L is called to return the C field of this resent group. With any arguments, a list of C objects is returned, taken from the specified $message or message $head. =item $obj-EB() =item Mail::Message::Head::ResentGroup-EB() Inherited, see L =item Mail::Message::Head::ResentGroup-EB( [$fields], %options ) Create an object which maintains one set of resent headers. The $fields are L objects from the same header. %options which start with capitals will be used to construct additional fields. These option names are prepended with C, keeping the capitization of what is specified. -Option --Defined in --Default Bcc undef Cc undef Date Delivered-To undef From Message-ID Received Return-Path undef Sender undef To undef head 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 =over 2 =item Bcc => STRING|OBJECT|OBJECTS =item Cc => STRING|OBJECT|OBJECTS =item Date => STRING When this resent-group is dispatched by the resender of the message. Like the C field, it is not the date and time that the message was actually transported. =item Delivered-To => STRING|FIELD =item From => STRING|OBJECT|OBJECTS =item Message-ID => STRING|FIELD The C which identifies this resent group. The FIELD must contain a message id. =item Received => STRING The C field is the starting line for a resent group of header lines. If it is not defined, one is created using L. =item Return-Path => STRING|FIELD =item 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. =item To => STRING|OBJECT|OBJECTS =item head => OBJECT The header where the data is stored in. By default a L is created for you. =item log => LEVEL =item message_head => HEAD The real header of the message where this resent group is part of. The C used in this class is only a container for a subset of fields. =item software => STRING =item trace => LEVEL =item type => STRING =item version => STRING =back =back =head2 The header Extends L<"The header" in Mail::Message::Head::FieldGroup|Mail::Message::Head::FieldGroup/"The header">. =over 4 =item $obj-EB( <$field, $value> | $object ) All fields appear only once, so C behaves as L. =item $obj-EB( [$fieldnames] ) Not applicable to resent-groups: the same name can appear in more than one group. Therefore, a FIELDNAME is sufficiently distinctive. =item $obj-EB($head) Inherited, see L =item $obj-EB() Inherited, see L =item $obj-EB() Inherited, see L =item $obj-EB() Inherited, see L =item $obj-EB() Inherited, see L =item $obj-EB( [$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 L is called. =item $obj-EB() Returns the fields in the order as should appear in header according to rfc2822. For the C fields of the group, the order is not that important, but the C, C, and C must come first. Only fields mentioned in the RFC are returned. =item $obj-EB( <$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'); =back =head2 Access to the header Extends L<"Access to the header" in Mail::Message::Head::FieldGroup|Mail::Message::Head::FieldGroup/"Access to the header">. =over 4 =item $obj-EB() In scalar context, the C field is returned. In list context, the addresses as specified within the bcc field are returned as L objects. Bcc fields are not transmitted (hidden for external parties). =item $obj-EB() In scalar context, the C field is returned. In list context, the addresses as specified within the cc field are returned as L objects. =item $obj-EB() Returns the C field, or C if it was not defined. =item $obj-EB() The timestamp as stored within the C field converted to local system time. =item $obj-EB() The field which describes the C of this resent group. =item $obj-EB() Returns a list of all addresses specified in the C, C<-Cc>, and C<-Bcc> fields of this resent group. =item $obj-EB($name) =item Mail::Message::Head::ResentGroup-EB($name) =item $obj-EB() Returns the message-ID used for this group of resent lines. =item $obj-EB() The field which describes the C data of this resent group. =item $obj-EB() The timestamp as stored within the C field converted to local system time. =item $obj-EB() In scalar context, the C field is returned. In list context, the addresses as specified within the from field are returned as L objects. For reasons of backward compatibility and consistency, the L method will return the same as this method. =item $obj-EB() The field which describes the C of this resent group. =item $obj-EB() In scalar context, the C field is returned. In list context, the addresses as specified within the from field are returned as L objects. =item $obj-EB() Inherited, see L =item $obj-EB() In scalar context, the C field is returned. In list context, the addresses as specified within the to field are returned as L objects. =item $obj-EB() Inherited, see L =item $obj-EB() Inherited, see L =back =head2 Internals Extends L<"Internals" in Mail::Message::Head::FieldGroup|Mail::Message::Head::FieldGroup/"Internals">. =over 4 =item $obj-EB( [$name] ) Inherited, see L =item $obj-EB( [$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. =item $obj-EB($type, $software, $version) Inherited, see L =back =head2 Error handling Extends L<"Error handling" in Mail::Message::Head::FieldGroup|Mail::Message::Head::FieldGroup/"Error handling">. =over 4 =item $obj-EB() Inherited, see L =item $obj-EB($object) Inherited, see L =item $obj-EB( [$level]|[$loglevel, $tracelevel]|[$level, $callback] ) =item Mail::Message::Head::ResentGroup-EB( [$level]|[$loglevel, $tracelevel]|[$level, $callback] ) Inherited, see L =item $obj-EB
() Inherited, see L =item $obj-EB() Inherited, see L =item $obj-EB( [$level, [$strings]] ) =item Mail::Message::Head::ResentGroup-EB( [$level, [$strings]] ) Inherited, see L =item $obj-EB($level) =item Mail::Message::Head::ResentGroup-EB($level) Inherited, see L =item $obj-EB() Inherited, see L =item $obj-EB() Inherited, see L =item $obj-EB( [$fh] ) Inherited, see L =item $obj-EB( [$level] ) Inherited, see L =item $obj-EB( [$level] ) Inherited, see L =item $obj-EB( [$level] ) Inherited, see L =item $obj-EB() Inherited, see L =back =head2 Cleanup Extends L<"Cleanup" in Mail::Message::Head::FieldGroup|Mail::Message::Head::FieldGroup/"Cleanup">. =over 4 =item $obj-EB() Inherited, see L =back =head1 DIAGNOSTICS =over 4 =item Error: Message header required for creation of ResentGroup. It is required to know to which header the resent-group is created. Use the C option. Maybe you should use L with DATA, which will organize the correct initiations for you. =item 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. =back =head1 SEE ALSO This module is part of Mail-Message distribution version 3.012, built on February 11, 2022. Website: F =head1 LICENSE Copyrights 2001-2022 by [Mark Overmeer ]. For other contributors see ChangeLog. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See F