Mail::Message::Head::ResentGroup - header fields tracking message delivery
Mail::Message::Head::ResentGroup is a Mail::Message::Head::FieldGroup is a Mail::Reporter
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;
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!
user's
Extends "DESCRIPTION" in Mail::Message::Head::FieldGroup.
Extends "METHODS" in Mail::Message::Head::FieldGroup.
Extends "Constructors" in Mail::Message::Head::FieldGroup.
Inherited, see "Constructors" in Mail::Message::Head::FieldGroup
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.
From
With any arguments, a list of Mail::Message::Head::ResentGroup objects is returned, taken from the specified $message or message $head.
Mail::Message::Head::ResentGroup
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.
Resent-*
-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
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.
Date
The Resent-Message-ID which identifies this resent group. The FIELD must contain a message id.
Resent-Message-ID
The Received field is the starting line for a resent group of header lines. If it is not defined, one is created using createReceived().
Received
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.
The header where the data is stored in. By default a Mail::Message::Head::Partial is created for you.
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.
head
Extends "The header" in Mail::Message::Head::FieldGroup.
All fields appear only once, so add() behaves as set().
add()
Not applicable to resent-groups: the same name can appear in more than one group. Therefore, a FIELDNAME is sufficiently distinctive.
Inherited, see "The header" in Mail::Message::Head::FieldGroup
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.
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.
Return-Path
Delivered-To
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');
Extends "Access to the header" in Mail::Message::Head::FieldGroup.
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).
Resent-Bcc
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.
Resent-Cc
Returns the Resent-Date field, or undef if it was not defined.
Resent-Date
undef
The timestamp as stored within the Resent-Date field converted to local system time.
The field which describes the Delivered-To of this resent group.
Returns a list of all addresses specified in the Resent-To, -Cc, and -Bcc fields of this resent group.
Resent-To
-Cc
-Bcc
Returns the message-ID used for this group of resent lines.
The field which describes the Received data of this resent group.
The timestamp as stored within the Received field converted to local system time.
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.
Resent-From
For reasons of backward compatibility and consistency, the from() method will return the same as this method.
The field which describes the Return-Path of this resent group.
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.
Resent-Sender
Inherited, see "Access to the header" in Mail::Message::Head::FieldGroup
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.
Extends "Internals" in Mail::Message::Head::FieldGroup.
Inherited, see "Internals" in Mail::Message::Head::FieldGroup
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.
Extends "Error handling" in Mail::Message::Head::FieldGroup.
Inherited, see "Error handling" in Mail::Reporter
Inherited, see "Error handling" in Mail::Message::Head::FieldGroup
Extends "Cleanup" in Mail::Message::Head::FieldGroup.
Inherited, see "Cleanup" in Mail::Reporter
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.
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.
This module is part of Mail-Message distribution version 3.000, built on February 02, 2017.
Do not forget to read "Mail::Box-Overview", "Mail::Box-Cookbook", and "Mail::Box-Index". Examples are included in the Mail-Box distribution, directories 'examples' and 'scripts'.
Browseable manuals, papers, and other released material van be found at Website: http://perl.overmeer.net/mailbox/
The central modules (in separate distributions) in the MailBox suite are: "Mail::Message", "Mail::Box", "Mail::Box::IMAP4", "Mail::Box::POP3", "Mail::Box::Parser::C", "Mail::Box::Dbx" (unpublished), "Mail::Transport", "Object::Realize::Later", and "User::Identity".
Please post questions or ideas to the author markov@cpan.org.
Copyrights 2001-2017 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 http://www.perl.com/perl/misc/Artistic.html
To install Mail::Message, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mail::Message
CPAN shell
perl -MCPAN -e shell install Mail::Message
For more information on module installation, please visit the detailed CPAN module installation guide.