Mail::M...ntGroup(3)
π NAME π
Mail::Message::Head::ResentGroup β header fields tracking message delivery β¨
(you're in the User Contributed Perl Documentation zone, bestie, and this is part 1 of 2 π)
π INHERITANCE π
Mail::Message::Head::ResentGroup
is a Mail::Message::Head::FieldGroup
is a Mail::Reporter
so it's giving whole family tree energy π
β¨ 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 π¦
okay so a resent group is literally just a set of header fields that describe one intermediate step in the message transport π
and here's the thing you need to internalise: resent groups have NOTHING to do with user activity. there is no relation to the "user's" sense of creating reply, forward, or bounce messages at all! like, zero, none, not a single vibe check π₯
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] )β okay bestie, WARNING: this method has two very different purposes. for backward compatibility reasons, without argumentsresentFrom()is called to return the"From"field of this resent group π With any arguments, a list ofMail::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 with"Resent-*", 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>
message_head undef
software Mail::Message::Head::FieldGroup undef
type Mail::Message::Head::FieldGroup undef
version Mail::Message::Head::FieldGroup undef
and here's what each of those actually does, one by one, no skips π
Bcc => $text|$field|\@fieldsβ yep, that's the bcc one π«ΆCc => $text|$field|\@fieldsβ and the cc one πDate => $dateβ 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. so don't clock it as the real transport time, bestie β°Delivered-To => $text|$fieldβ the delivered-to situation π¬From => $text|$field|\@fieldsβ where it came from πMessage-ID => $text|$fieldβ the"Resent-Message-ID"which identifies this resent group. the$fieldmust contain a message id. no cap.Received => $textβ the"Received"field is the starting line for a resent group of header lines. If it is not defined, one is created usingcreateReceived(). iconic β¨Return-Path => $text|$fieldβ the return path, obviously π«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. main character energy, literally πTo => $text|$field|\@fieldsβ who it's going to πhead => $headβ the$headobject where the data is stored in. By default a Mail::Message::Head::Partial is created for you. so thoughtful fr frmessage_head => $headβ the real$headof the message where this resent group is part of. The"head"used in this class is only a container for a subset of fields. lowkey just a lil container πsoftware => STRINGβ software string, undef by default π»type => STRINGβ type string, undef by default πΈversion => STRINGβ version string, undef by default π’
π Attributes π
Extends "Attributes" in Mail::Message::Head::FieldGroup.
(nothing extra listed here, bestie β the parent's got it π )
πΈ The header πΈ
Extends "The header" in Mail::Message::Head::FieldGroup.
$obj->add( <$field, $value> | $object )β all fields appear only once, soadd()behaves asset(). Improves base, see"The header"in Mail::Message::Head::FieldGroup. one field, one time, periodt β$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. yeah it's just not that girl for this class π$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"undef"at creation, and then later filled in whenMail::Message::Head::Complete::addResentGroup()is called. it grows into its role, we love a late bloomer π¦$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. so like, those three are the opening act and everyone else can chill π₯$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-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). secret lil guest list π€«$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. may or may not show up, it's giving mystery π$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. the whole squad of destinations fr fr π$any->isResentGroupFieldName($name)β checks if that$nameis a resent-group field 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, thefrom()method will return the same as this method. besties forever π€$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()β inherited, see"Access to the header"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()β 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. (ngl, the docs said it, not me π)$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->details()β inherited, see"Error handling"in Mail::Message::Head::FieldGroup π$obj->notImplemented()β inherited, see"Error handling"in Mail::Reporter π$obj->print( [$fh] )β inherited, see"Error handling"in Mail::Message::Head::FieldGroup π¨οΈ
π«Ά Cleanup π«Ά
Extends "Cleanup" in Mail::Message::Head::FieldGroup.
$obj->DESTROY()β inherited, see"Cleanup"in Mail::Reporter β°οΈ
β DIAGNOSTICS β
- Error: class $package does not implement method $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 bynotImplemented()π₯
so yeah, if you see that one, it's not your fault bestie, somebody's class is slacking π
π SEE ALSO π
So like, this whole module is part of Mail-Message version 4.04, and it got built on February 04, 2026. Bestie, if you wanna go touch grass on the internet about it, the website is http://perl.overmeer.net/CPAN/ β¨
π LICENSE π
For all my contributors out there β check the file ChangeLog, that's where the receipts live π
This software is copyright (c) 2001-2026 by Mark Overmeer. Iconic run, honestly, two decades plus of holding it down π
It's free software, fr fr: you can redistribute it and/or modify it under the exact same terms as the Perl 5 programming language system itself. No cap, that's the whole deal π«Ά
okay and that's a wrap on the whole page, bestie!! this was perl v5.42.0, dated 2026-02-05, and yeah the title got cutely truncated to Mail::M...ntGroup(3) in the footer because headers are dramatic like that π go forth and group your messages, you absolute main character πΈπ¦π
π¦ where this page comes from
- fedora 44: perl-Mail-Message 4.04-1.fc44 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms