1Mail::Message::ConstrucUts:e:rTeCxotn(t3r)ibuted Perl DoMcauimle:n:tMaetsisoange::Construct::Text(3)
2
3
4

NAME

6       Mail::Message::Construct::Text - capture a Mail::Message as text
7

SYNOPSIS

9        my $text = $msg->string;
10        my $text = "$msg";   # via overload
11
12        my @text = $msg->lines;
13        my @text = @$lines;  # via overload
14
15        my $fh   = $msg->file;
16        my $line = <$fh>;
17
18        $msg->printStructure;
19

DESCRIPTION

21       Complex functionality on Mail::Message objects is implemented in dif‐
22       ferent files which are autoloaded.  This file implements the function‐
23       ality related to creating message replies.
24

METHODS

26       The whole message as text
27
28       $obj->file
29
30           Returns the message as file-handle.
31
32       $obj->lines
33
34           Returns the whole message as set of lines.  In LIST context, copies
35           of the lines are returned.  In SCALAR context, a reference to an
36           array of lines is returned.
37
38       $obj->printStructure([FILEHANDLE⎪undef],[INDENT])
39
40           Print the structure of a message to the specified FILEHANDLE or the
41           selected filehandle.  When explicitly "undef" is specified as han‐
42           dle, then the output will be returned as string.
43
44           The message's subject and the types of all composing parts are dis‐
45           played.
46
47           INDENT specifies the initial indentation string: it is added in
48           front of each line. The INDENT must contain at least one
49           white-space.
50
51           Example:
52
53            my $msg = ...;
54            $msg->printStructure(\*OUTPUT);
55
56            $msg->printStructure;
57
58            my $struct = $msg->printStructure(undef);
59
60            # Possible output for one message:
61            multipart/mixed: forwarded message from Pietje Puk (1550 bytes)
62               text/plain (164 bytes)
63               message/rfc822 (1043 bytes)
64                  multipart/alternative: A multipart alternative (942 bytes)
65                     text/plain (148 bytes, deleted)
66                     text/html (358 bytes)
67
68       $obj->string
69
70           Returns the whole message as string.
71
72       Flags
73

SEE ALSO

75       This module is part of Mail-Box distribution version 2.070, built on
76       March 25, 2007. Website: http://perl.overmeer.net/mailbox/
77

LICENSE

79       Copyrights 2001-2007 by Mark Overmeer.For other contributors see
80       ChangeLog.
81
82       This program is free software; you can redistribute it and/or modify it
83       under the same terms as Perl itself.  See
84       http://www.perl.com/perl/misc/Artistic.html
85
86
87
88perl v5.8.8                       2007-03-25 Mail::Message::Construct::Text(3)
Impressum