1Mail::Message::Head::ReUsseenrtGCroonutpr(i3b)uted PerlMDaoiclu:m:eMnetsastaigoen::Head::ResentGroup(3)
2
3
4
6 Mail::Message::Head::ResentGroup - header fields tracking message
7 delivery
8
10 Mail::Message::Head::ResentGroup
11 is a Mail::Message::Head::FieldGroup
12 is a Mail::Reporter
13
15 my $rg = Mail::Message::Head::ResentGroup->new(head => $head,
16 From => 'me@home.nl', To => 'You@tux.aq');
17 $head->addResentGroup($rg);
18
19 my $rg = $head->addResentGroup(From => 'me');
20
21 my @from = $rg->From;
22
23 my @rgs = $head->resentGroups;
24 $rg[2]->delete if @rgs > 2;
25
27 A resent group is a set of header fields which describe one
28 intermediate step in the message transport. Resent groups have NOTHING
29 to do with user activety; there is no relation to the "user's" sense of
30 creating reply, forward, or bounce messages at all!
31
33 Constructors
34 $obj->clone
35 See "Constructors" in Mail::Message::Head::FieldGroup
36
37 $obj->from([HEAD|MESSAGE, OPTIONS])
38 WARNING: this method has two very different purposes. For backward
39 compatibility reasons, without arguments resentFrom() is called to
40 return the "From" field of this resent group.
41
42 With any arguments, a list of "Mail::Message::Head::ResentGroup"
43 objects is returned, taken from the specified MESSAGE or message
44 HEAD.
45
46 $obj->implementedTypes
47 Mail::Message::Head::ResentGroup->implementedTypes
48
49 See "Constructors" in Mail::Message::Head::FieldGroup
50
51 Mail::Message::Head::ResentGroup->new([FIELDS], OPTIONS)
52 Create an object which maintains one set of resent headers. The
53 FIELDS are Mail::Message::Field objects from the same header.
54
55 OPTIONS which start with capitals will be used to construct
56 additional fields. These option names are prepended with
57 "Resent-*", keeping the capitization of what is specified.
58
59 -Option --Defined in --Default
60 Bcc undef
61 Cc undef
62 Date <now>
63 Delivered-To undef
64 From <required>
65 Message-ID <uniquely created>
66 Received <created>
67 Return-Path undef
68 Sender undef
69 To undef
70 head <created automatically>
71 log Mail::Reporter 'WARNINGS'
72 message_head undef
73 software Mail::Message::Head::FieldGroup undef
74 trace Mail::Reporter 'WARNINGS'
75 type Mail::Message::Head::FieldGroup undef
76 version Mail::Message::Head::FieldGroup undef
77
78 Bcc => STRING|OBJECT|OBJECTS
79 Cc => STRING|OBJECT|OBJECTS
80 Date => STRING
81 When this resent-group is dispatched by the resender of the
82 message. Like the "Date" field, it is not the date and time that
83 the message was actually transported.
84
85 Delivered-To => STRING|FIELD
86 From => STRING|OBJECT|OBJECTS
87 Message-ID => STRING|FIELD
88 The "Resent-Message-ID" which identifies this resent group. The
89 FIELD must contain a message id.
90
91 Received => STRING
92 The "Received" field is the starting line for a resent group of
93 header lines. If it is not defined, one is created using
94 createReceived().
95
96 Return-Path => STRING|FIELD
97 Sender => STRING|OBJECT
98 Only permitted when more than one from address is specified. In
99 this case, it selects one of these addresses as the main
100 originator of the message.
101
102 To => STRING|OBJECT|OBJECTS
103 head => OBJECT
104 The header where the data is stored in. By default a
105 Mail::Message::Head::Partial is created for you.
106
107 log => LEVEL
108 message_head => HEAD
109 The real header of the message where this resent group is part
110 of. The "head" used in this class is only a container for a
111 subset of fields.
112
113 software => STRING
114 trace => LEVEL
115 type => STRING
116 version => STRING
117
118 The header
119 $obj->add((FIELD => VALUE) | OBJECT)
120 All fields appear only once, so "add()" behaves as set().
121
122 $obj->addFields([FIELDNAMES])
123 Not applicable to resent-groups: the same name can appear in more
124 than one group. Therefore, a FIELDNAME is sufficiently
125 distinctive.
126
127 $obj->attach(HEAD)
128 See "The header" in Mail::Message::Head::FieldGroup
129
130 $obj->delete
131 See "The header" in Mail::Message::Head::FieldGroup
132
133 $obj->fieldNames
134 See "The header" in Mail::Message::Head::FieldGroup
135
136 $obj->fields
137 See "The header" in Mail::Message::Head::FieldGroup
138
139 $obj->head
140 See "The header" in Mail::Message::Head::FieldGroup
141
142 $obj->messageHead([HEAD])
143 Returns (optionally after setting) the real header where this
144 resent group belongs to. This may be undef at creation, and then
145 later filled in when
146 Mail::Message::Head::Complete::addResentGroup() is called.
147
148 $obj->orderedFields
149 Returns the fields in the order as should appear in header
150 according to rfc2822. For the "Resent-*" fields of the group, the
151 order is not that important, but the "Return-Path", "Delivered-To",
152 and "Received" must come first. Only fields mentioned in the RFC
153 are returned.
154
155 $obj->set((FIELD => VALUE) | OBJECT)
156 Set a FIELD to a (new) VALUE. The FIELD names which do not start
157 with 'Resent-*' but need it will have that added. It is also an
158 option to specify a fully prepared message field OBJECT. In any
159 case, a field OBJECT is returned.
160
161 example:
162
163 my $this = Mail::Message::Head::ResentGroup->new;
164 $this->set(To => 'fish@tux.aq');
165 $msg->addResentGroup($this);
166 $msg->send;
167
168 $msg->bounce(To => 'fish@tux.aq')->send; # the same
169
170 my $this = Mail::Message::Head::ResentGroup
171 ->new(To => 'fish@tux.aq');
172
173 Access to the header
174 $obj->bcc
175 In scalar context, the "Resent-Bcc" field is returned. In list
176 context, the addresses as specified within the bcc field are
177 returned as Mail::Address objects. Bcc fields are not transmitted
178 (hidden for external parties).
179
180 $obj->cc
181 In scalar context, the "Resent-Cc" field is returned. In list
182 context, the addresses as specified within the cc field are
183 returned as Mail::Address objects.
184
185 $obj->date
186 Returns the "Resent-Date" field, or "undef" if it was not defined.
187
188 $obj->dateTimestamp
189 The timestamp as stored within the "Resent-Date" field converted to
190 local system time.
191
192 $obj->deliveredTo
193 The field which describes the "Delivered-To" of this resent group.
194
195 $obj->destinations
196 Returns a list of all addresses specified in the "Resent-To",
197 "-Cc", and "-Bcc" fields of this resent group.
198
199 $obj->isResentGroupFieldName(NAME)
200 Mail::Message::Head::ResentGroup->isResentGroupFieldName(NAME)
201
202 $obj->messageId
203 Returns the message-ID used for this group of resent lines.
204
205 $obj->received
206 The field which describes the "Received" data of this resent group.
207
208 $obj->receivedTimestamp
209 The timestamp as stored within the "Received" field converted to
210 local system time.
211
212 $obj->resentFrom
213 In scalar context, the "Resent-From" field is returned. In list
214 context, the addresses as specified within the from field are
215 returned as Mail::Address objects.
216
217 For reasons of backward compatibility and consistency, the from()
218 method will return the same as this method.
219
220 $obj->returnPath
221 The field which describes the "Return-Path" of this resent group.
222
223 $obj->sender
224 In scalar context, the "Resent-Sender" field is returned. In list
225 context, the addresses as specified within the from field are
226 returned as Mail::Address objects.
227
228 $obj->software
229 See "Access to the header" in Mail::Message::Head::FieldGroup
230
231 $obj->to
232 In scalar context, the "Resent-To" field is returned. In list
233 context, the addresses as specified within the to field are
234 returned as Mail::Address objects.
235
236 $obj->type
237 See "Access to the header" in Mail::Message::Head::FieldGroup
238
239 $obj->version
240 See "Access to the header" in Mail::Message::Head::FieldGroup
241
242 Internals
243 $obj->collectFields([NAME])
244 See "Internals" in Mail::Message::Head::FieldGroup
245
246 $obj->createReceived([DOMAIN])
247 Create a received field for this resent group. This is
248 automatically called if none was specified during creation of this
249 resent group object.
250
251 The content of this field is described in RFC2821 section 4.4. It
252 could use some improvement.
253
254 $obj->detected(TYPE, SOFTWARE, VERSION)
255 See "Internals" in Mail::Message::Head::FieldGroup
256
257 Error handling
258 $obj->AUTOLOAD
259 See "Error handling" in Mail::Reporter
260
261 $obj->addReport(OBJECT)
262 See "Error handling" in Mail::Reporter
263
264 $obj->defaultTrace([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
265 Mail::Message::Head::ResentGroup->defaultTrace([LEVEL]|[LOGLEVEL,
266 TRACELEVEL]|[LEVEL, CALLBACK])
267
268 See "Error handling" in Mail::Reporter
269
270 $obj->details
271 See "Error handling" in Mail::Message::Head::FieldGroup
272
273 $obj->errors
274 See "Error handling" in Mail::Reporter
275
276 $obj->log([LEVEL [,STRINGS]])
277 Mail::Message::Head::ResentGroup->log([LEVEL [,STRINGS]])
278
279 See "Error handling" in Mail::Reporter
280
281 $obj->logPriority(LEVEL)
282 Mail::Message::Head::ResentGroup->logPriority(LEVEL)
283
284 See "Error handling" in Mail::Reporter
285
286 $obj->logSettings
287 See "Error handling" in Mail::Reporter
288
289 $obj->notImplemented
290 See "Error handling" in Mail::Reporter
291
292 $obj->print([FILEHANDLE])
293 See "Error handling" in Mail::Message::Head::FieldGroup
294
295 $obj->report([LEVEL])
296 See "Error handling" in Mail::Reporter
297
298 $obj->reportAll([LEVEL])
299 See "Error handling" in Mail::Reporter
300
301 $obj->trace([LEVEL])
302 See "Error handling" in Mail::Reporter
303
304 $obj->warnings
305 See "Error handling" in Mail::Reporter
306
307 Cleanup
308 $obj->DESTROY
309 See "Cleanup" in Mail::Reporter
310
311 $obj->inGlobalDestruction
312 See "Cleanup" in Mail::Reporter
313
315 Error: Message header required for creation of ResentGroup.
316 It is required to know to which header the resent-group is created.
317 Use the "head" option. Maybe you should use
318 Mail::Message::Head::Complete::addResentGroup() with DATA, which
319 will organize the correct initiations for you.
320
321 Error: Package $package does not implement $method.
322 Fatal error: the specific package (or one of its superclasses) does
323 not implement this method where it should. This message means that
324 some other related classes do implement this method however the
325 class at hand does not. Probably you should investigate this and
326 probably inform the author of the package.
327
329 This module is part of Mail-Box distribution version 2.097, built on
330 January 26, 2011. Website: http://perl.overmeer.net/mailbox/
331
333 Copyrights 2001-2011 by Mark Overmeer. For other contributors see
334 ChangeLog.
335
336 This program is free software; you can redistribute it and/or modify it
337 under the same terms as Perl itself. See
338 http://www.perl.com/perl/misc/Artistic.html
339
340
341
342perl v5.12.3 2011-01-26Mail::Message::Head::ResentGroup(3)