See METHODS in Mail::Reporter
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.
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 |
|
message_head |
| |
software | Mail::Message::Head::FieldGroup |
|
trace | Mail::Reporter |
|
type | Mail::Message::Head::FieldGroup |
|
version | Mail::Message::Head::FieldGroup |
|
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.
Not applicable to resent-groups: the same name can appear in more than one group. Therefore, a FIELDNAME is sufficiently distinctive.
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.
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.
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');
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).
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.
Returns the Resent-Date
field, or undef
if it was not defined.
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.
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.
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.
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.
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.