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
22       different files which are autoloaded.  This file implements the
23       functionality related to creating message replies.
24

METHODS

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

SEE ALSO

69       This module is part of Mail-Message distribution version 3.010, built
70       on October 14, 2020. Website: http://perl.overmeer.net/CPAN/
71

LICENSE

73       Copyrights 2001-2020 by [Mark Overmeer <markov@cpan.org>]. For other
74       contributors see ChangeLog.
75
76       This program is free software; you can redistribute it and/or modify it
77       under the same terms as Perl itself.  See http://dev.perl.org/licenses/
78
79
80
81perl v5.32.1                      2021-01-27 Mail::Message::Construct::Text(3)
Impressum