1Mail::Message::Dummy(3)User Contributed Perl DocumentatioMnail::Message::Dummy(3)
2
3
4
6 Mail::Message::Dummy - a placeholder for a missing messages
7
9 Mail::Message::Dummy
10 is a Mail::Message
11 is a Mail::Reporter
12
14 Dummy messages are used by modules which maintain ordered lists of
15 messages, usually based on message-id. A good example is
16 Mail::Box::Thread::Manager, which detects related messages by scanning
17 the known message headers for references to other messages. As long as
18 the referenced messages are not found inside the mailbox, their place
19 is occupied by a dummy.
20
21 Be careful when using modules which may create dummies. Before trying
22 to access the header or body use isDummy() to check if the message is a
23 dummy message.
24
26 Constructors
27 $obj->clone(OPTIONS)
28 See "Constructors" in Mail::Message
29
30 Mail::Message::Dummy->new(MESSAGE-ID, OPTIONS)
31 Create a new dummy message to occupy the space for a real message
32 with the specified MESSAGE-ID.
33
34 -Option --Defined in --Default
35 body Mail::Message <not used>
36 body_type Mail::Message Mail::Message::Body::Lines
37 deleted Mail::Message <false>
38 field_type Mail::Message <not used>
39 head Mail::Message <not used>
40 head_type Mail::Message <not used>
41 labels Mail::Message {}
42 log Mail::Reporter 'WARNINGS'
43 messageId Mail::Message <required>
44 modified Mail::Message <always false>
45 trace Mail::Reporter 'WARNINGS'
46 trusted Mail::Message <always true>
47
48 body => OBJECT
49 body_type => CLASS
50 deleted => BOOLEAN
51 field_type => CLASS
52 head => OBJECT
53 head_type => CLASS
54 labels => ARRAY|HASH
55 log => LEVEL
56 messageId => STRING
57 modified => BOOLEAN
58 trace => LEVEL
59 trusted => BOOLEAN
60
61 example:
62
63 my $message = Mail::Message::Dummy->new($msgid);
64 if($message->isDummy) {...}
65
66 Constructing a message
67 $obj->bounce([RG-OBJECT|OPTIONS])
68 See "Constructing a message" in Mail::Message::Construct::Bounce
69
70 Mail::Message::Dummy->build([MESSAGE|PART|BODY], CONTENT)
71 See "Constructing a message" in Mail::Message::Construct::Build
72
73 Mail::Message::Dummy->buildFromBody(BODY, [HEAD], HEADERS)
74 See "Constructing a message" in Mail::Message::Construct::Build
75
76 $obj->forward(OPTIONS)
77 See "Constructing a message" in Mail::Message::Construct::Forward
78
79 $obj->forwardAttach(OPTIONS)
80 See "Constructing a message" in Mail::Message::Construct::Forward
81
82 $obj->forwardEncapsulate(OPTIONS)
83 See "Constructing a message" in Mail::Message::Construct::Forward
84
85 $obj->forwardInline(OPTIONS)
86 See "Constructing a message" in Mail::Message::Construct::Forward
87
88 $obj->forwardNo(OPTIONS)
89 See "Constructing a message" in Mail::Message::Construct::Forward
90
91 $obj->forwardPostlude
92 See "Constructing a message" in Mail::Message::Construct::Forward
93
94 $obj->forwardPrelude
95 See "Constructing a message" in Mail::Message::Construct::Forward
96
97 $obj->forwardSubject(STRING)
98 See "Constructing a message" in Mail::Message::Construct::Forward
99
100 Mail::Message::Dummy->read(FILEHANDLE|SCALAR|REF-SCALAR|ARRAY-OF-LINES,
101 OPTIONS)
102 See "Constructing a message" in Mail::Message::Construct::Read
103
104 $obj->rebuild(OPTIONS)
105 See "Constructing a message" in Mail::Message::Construct::Rebuild
106
107 $obj->reply(OPTIONS)
108 See "Constructing a message" in Mail::Message::Construct::Reply
109
110 $obj->replyPrelude([STRING|FIELD|ADDRESS|ARRAY-OF-THINGS])
111 See "Constructing a message" in Mail::Message::Construct::Reply
112
113 $obj->replySubject(STRING)
114 Mail::Message::Dummy->replySubject(STRING)
115
116 See "Constructing a message" in Mail::Message::Construct::Reply
117
118 The message
119 $obj->container
120 See "The message" in Mail::Message
121
122 $obj->isDummy
123 See "The message" in Mail::Message
124
125 $obj->isPart
126 See "The message" in Mail::Message
127
128 $obj->messageId
129 See "The message" in Mail::Message
130
131 $obj->print([FILEHANDLE])
132 See "The message" in Mail::Message
133
134 $obj->send([MAILER], OPTIONS)
135 See "The message" in Mail::Message
136
137 $obj->size
138 See "The message" in Mail::Message
139
140 $obj->toplevel
141 See "The message" in Mail::Message
142
143 $obj->write([FILEHANDLE])
144 See "The message" in Mail::Message
145
146 The header
147 $obj->bcc
148 See "The header" in Mail::Message
149
150 $obj->cc
151 See "The header" in Mail::Message
152
153 $obj->date
154 See "The header" in Mail::Message
155
156 $obj->destinations
157 See "The header" in Mail::Message
158
159 $obj->from
160 See "The header" in Mail::Message
161
162 $obj->get(FIELDNAME)
163 See "The header" in Mail::Message
164
165 $obj->guessTimestamp
166 See "The header" in Mail::Message
167
168 $obj->head(...)
169 $obj->nrLines
170 See "The header" in Mail::Message
171
172 $obj->sender
173 See "The header" in Mail::Message
174
175 $obj->study(FIELDNAME)
176 See "The header" in Mail::Message
177
178 $obj->subject
179 See "The header" in Mail::Message
180
181 $obj->timestamp
182 See "The header" in Mail::Message
183
184 $obj->to
185 See "The header" in Mail::Message
186
187 The body
188 $obj->body([BODY])
189 See "The body" in Mail::Message
190
191 $obj->contentType
192 See "The body" in Mail::Message
193
194 $obj->decoded(OPTIONS)
195 See "The body" in Mail::Message
196
197 $obj->encode(OPTIONS)
198 See "The body" in Mail::Message
199
200 $obj->isMultipart
201 See "The body" in Mail::Message
202
203 $obj->isNested
204 See "The body" in Mail::Message
205
206 $obj->parts(['ALL'|'ACTIVE'|'DELETED'|'RECURSE'|FILTER])
207 See "The body" in Mail::Message
208
209 Flags
210 $obj->delete
211 See "Flags" in Mail::Message
212
213 $obj->deleted([BOOLEAN])
214 See "Flags" in Mail::Message
215
216 $obj->isDeleted
217 See "Flags" in Mail::Message
218
219 $obj->isModified
220 See "Flags" in Mail::Message
221
222 $obj->label(LABEL|PAIRS)
223 See "Flags" in Mail::Message
224
225 $obj->labels
226 See "Flags" in Mail::Message
227
228 $obj->labelsToStatus
229 See "Flags" in Mail::Message
230
231 $obj->modified([BOOLEAN])
232 See "Flags" in Mail::Message
233
234 $obj->statusToLabels
235 See "Flags" in Mail::Message
236
237 The whole message as text
238 $obj->file
239 See "The whole message as text" in Mail::Message::Construct::Text
240
241 $obj->lines
242 See "The whole message as text" in Mail::Message::Construct::Text
243
244 $obj->printStructure([FILEHANDLE|undef],[INDENT])
245 See "The whole message as text" in Mail::Message::Construct::Text
246
247 $obj->string
248 See "The whole message as text" in Mail::Message::Construct::Text
249
250 Internals
251 $obj->clonedFrom
252 See "Internals" in Mail::Message
253
254 Mail::Message::Dummy->coerce(MESSAGE, OPTIONS)
255 See "Internals" in Mail::Message
256
257 $obj->isDelayed
258 See "Internals" in Mail::Message
259
260 $obj->readBody(PARSER, HEAD [, BODYTYPE])
261 See "Internals" in Mail::Message
262
263 $obj->readFromParser(PARSER, [BODYTYPE])
264 See "Internals" in Mail::Message
265
266 $obj->readHead(PARSER [,CLASS])
267 See "Internals" in Mail::Message
268
269 $obj->recursiveRebuildPart(PART, OPTIONS)
270 See "Internals" in Mail::Message::Construct::Rebuild
271
272 $obj->storeBody(BODY)
273 See "Internals" in Mail::Message
274
275 $obj->takeMessageId([STRING])
276 See "Internals" in Mail::Message
277
278 Error handling
279 $obj->AUTOLOAD
280 See "METHODS" in Mail::Message::Construct
281
282 $obj->addReport(OBJECT)
283 See "Error handling" in Mail::Reporter
284
285 $obj->defaultTrace([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
286 Mail::Message::Dummy->defaultTrace([LEVEL]|[LOGLEVEL,
287 TRACELEVEL]|[LEVEL, CALLBACK])
288
289 See "Error handling" in Mail::Reporter
290
291 $obj->errors
292 See "Error handling" in Mail::Reporter
293
294 $obj->log([LEVEL [,STRINGS]])
295 Mail::Message::Dummy->log([LEVEL [,STRINGS]])
296
297 See "Error handling" in Mail::Reporter
298
299 $obj->logPriority(LEVEL)
300 Mail::Message::Dummy->logPriority(LEVEL)
301
302 See "Error handling" in Mail::Reporter
303
304 $obj->logSettings
305 See "Error handling" in Mail::Reporter
306
307 $obj->notImplemented
308 See "Error handling" in Mail::Reporter
309
310 $obj->report([LEVEL])
311 See "Error handling" in Mail::Reporter
312
313 $obj->reportAll([LEVEL])
314 See "Error handling" in Mail::Reporter
315
316 $obj->shortSize([VALUE])
317 Mail::Message::Dummy->shortSize([VALUE])
318
319 See "Error handling" in Mail::Message
320
321 $obj->shortString
322 See "Error handling" in Mail::Message
323
324 $obj->trace([LEVEL])
325 See "Error handling" in Mail::Reporter
326
327 $obj->warnings
328 See "Error handling" in Mail::Reporter
329
330 Cleanup
331 $obj->DESTROY
332 See "Cleanup" in Mail::Message
333
334 $obj->destruct
335 See "Cleanup" in Mail::Message
336
337 $obj->inGlobalDestruction
338 See "Cleanup" in Mail::Reporter
339
341 Error: Cannot coerce a $class object into a $class object
342 Error: Cannot include forward source as $include.
343 Unknown alternative for the forward(include). Valid choices are
344 "NO", "INLINE", "ATTACH", and "ENCAPSULATE".
345
346 Error: Cannot include reply source as $include.
347 Unknown alternative for the "include" option of reply(). Valid
348 choices are "NO", "INLINE", and "ATTACH".
349
350 Error: Message-Id is required for a dummy.
351 A dummy message occupies the place for a real message. When a
352 dummy is created, the id of the message which place it is holding
353 must be known.
354
355 Error: Method bounce requires To, Cc, or Bcc
356 The message bounce() method forwards a received message off to
357 someone else without modification; you must specified it's new
358 destination. If you have the urge not to specify any destination,
359 you probably are looking for reply(). When you wish to modify the
360 content, use forward().
361
362 Error: Method forwardAttach requires a preamble
363 Error: Method forwardEncapsulate requires a preamble
364 Error: No address to create forwarded to.
365 If a forward message is created, a destination address must be
366 specified.
367
368 Error: No default mailer found to send message.
369 The message send() mechanism had not enough information to
370 automatically find a mail transfer agent to sent this message.
371 Specify a mailer explicitly using the "via" options.
372
373 Error: No rebuild rule $name defined.
374 Error: Only build() Mail::Message's; they are not in a folder yet
375 You may wish to construct a message to be stored in a some kind of
376 folder, but you need to do that in two steps. First, create a
377 normal Mail::Message, and then add it to the folder. During this
378 Mail::Box::addMessage() process, the message will get coerce()-d
379 into the right message type, adding storage information and the
380 like.
381
382 Error: Package $package does not implement $method.
383 Fatal error: the specific package (or one of its superclasses) does
384 not implement this method where it should. This message means that
385 some other related classes do implement this method however the
386 class at hand does not. Probably you should investigate this and
387 probably inform the author of the package.
388
389 Error: You cannot take the head/body of a dummy message
390 Dummy messages are place-holders in message threads: the thread
391 detected the existence of the message, because it found the
392 message-id in a Reply-To or References field, however it did not
393 find the header and body of the message yet. Use isDummy() to
394 check whether the thread node returned a dummy or not.
395
396 Error: coercion starts with some object
397
399 This module is part of Mail-Box distribution version 2.097, built on
400 January 26, 2011. Website: http://perl.overmeer.net/mailbox/
401
403 Copyrights 2001-2011 by Mark Overmeer. For other contributors see
404 ChangeLog.
405
406 This program is free software; you can redistribute it and/or modify it
407 under the same terms as Perl itself. See
408 http://www.perl.com/perl/misc/Artistic.html
409
410
411
412perl v5.12.3 2011-01-26 Mail::Message::Dummy(3)