1Mail::Message::TransferUEsnecr(3C)ontributed Perl DocumeMnatialt:i:oMnessage::TransferEnc(3)
2
3
4

NAME

6       Mail::Message::TransferEnc - message transfer encoder/decoder
7

INHERITANCE

9        Mail::Message::TransferEnc
10          is a Mail::Reporter
11
12        Mail::Message::TransferEnc is extended by
13          Mail::Message::TransferEnc::Base64
14          Mail::Message::TransferEnc::Binary
15          Mail::Message::TransferEnc::EightBit
16          Mail::Message::TransferEnc::QuotedPrint
17          Mail::Message::TransferEnc::SevenBit
18

SYNOPSIS

20        my Mail::Message $msg = ...;
21        my $decoded = $msg->decoded;
22        my $encoded = $msg->encode(transfer => 'base64');
23

DESCRIPTION

25       This class is the base for various encoders and decoders, which are
26       used during transport of the message.  These packages, and all which
27       are derived, are invoked by the message's Mail::Message::decoded() and
28       Mail::Message::encode() methods:
29
30        my $message = $folder->message(3);
31        my $decoded_body = $message->decoded;
32        my $encoded_body = $message->encode(transfer => 'base64');
33
34       The following coders/decoders are currently available:
35
36       •   Mail::Message::TransferEnc::Base64
37
38           "base64" for binary information.
39
40       •   Mail::Message::TransferEnc::SevenBit
41
42           "7bit" for plain old ASCII characters only.
43
44       •   Mail::Message::TransferEnc::EightBit
45
46           "8bit" for extended character set data, not encoded.
47
48       •   Mail::Message::TransferEnc::QuotedPrint
49
50           "quoted-printable" encdoded extended character set data.
51
52       Extends "DESCRIPTION" in Mail::Reporter.
53

METHODS

55       Extends "METHODS" in Mail::Reporter.
56
57   Constructors
58       Extends "Constructors" in Mail::Reporter.
59
60       Mail::Message::TransferEnc->new(%options)
61           Inherited, see "Constructors" in Mail::Reporter
62
63   The Encoder
64       Mail::Message::TransferEnc->addTransferEncoder($type, $class)
65           Adds one new encoder to the list known by the Mail::Box suite.  The
66           $type is found in the message's header in the
67           "Content-Transfer-Encoding" field.
68
69       $obj->create($type, %options)
70           Create a new coder/decoder based on the required type.
71
72       $obj->name()
73           The name of the encoder.  Case is not significant.
74
75   Encoding
76       $obj->check($body, %options)
77           Check whether the body is correctly encoded.  If so, the body
78           reference is returned with the "checked" flag set.  Otherwise, a
79           new object is created and returned.
80
81            -Option     --Default
82             result_type  <type of source body>
83
84           result_type => CLASS
85             The type of the body to be produced, when the checker decides to
86             return modified data.
87
88       $obj->decode($body, %options)
89           Use the encoder to decode the content of $body.  A new body is
90           returned.
91
92            -Option     --Default
93             result_type  <type of source body>
94
95           result_type => CLASS
96             The type of the body to be produced, when the decoder decides to
97             return modified data.
98
99       $obj->encode($body, %options)
100           Use the encoder to encode the content of $body.
101
102            -Option     --Default
103             result_type  <type of source body>
104
105           result_type => CLASS
106             The type of the body to be produced, when the decoder decides to
107             return modified data.
108
109   Error handling
110       Extends "Error handling" in Mail::Reporter.
111
112       $obj->AUTOLOAD()
113           Inherited, see "Error handling" in Mail::Reporter
114
115       $obj->addReport($object)
116           Inherited, see "Error handling" in Mail::Reporter
117
118       $obj->defaultTrace( [$level]|[$loglevel, $tracelevel]|[$level,
119       $callback] )
120       Mail::Message::TransferEnc->defaultTrace( [$level]|[$loglevel,
121       $tracelevel]|[$level, $callback] )
122           Inherited, see "Error handling" in Mail::Reporter
123
124       $obj->errors()
125           Inherited, see "Error handling" in Mail::Reporter
126
127       $obj->log( [$level, [$strings]] )
128       Mail::Message::TransferEnc->log( [$level, [$strings]] )
129           Inherited, see "Error handling" in Mail::Reporter
130
131       $obj->logPriority($level)
132       Mail::Message::TransferEnc->logPriority($level)
133           Inherited, see "Error handling" in Mail::Reporter
134
135       $obj->logSettings()
136           Inherited, see "Error handling" in Mail::Reporter
137
138       $obj->notImplemented()
139           Inherited, see "Error handling" in Mail::Reporter
140
141       $obj->report( [$level] )
142           Inherited, see "Error handling" in Mail::Reporter
143
144       $obj->reportAll( [$level] )
145           Inherited, see "Error handling" in Mail::Reporter
146
147       $obj->trace( [$level] )
148           Inherited, see "Error handling" in Mail::Reporter
149
150       $obj->warnings()
151           Inherited, see "Error handling" in Mail::Reporter
152
153   Cleanup
154       Extends "Cleanup" in Mail::Reporter.
155
156       $obj->DESTROY()
157           Inherited, see "Cleanup" in Mail::Reporter
158

DIAGNOSTICS

160       Error: Decoder for transfer encoding $type does not work: $@
161           Compiling the required transfer encoding resulted in errors, which
162           means that the decoder can not be used.
163
164       Warning: No decoder for transfer encoding $type.
165           A decoder for the specified type of transfer encoding is not
166           implemented.
167
168       Error: Package $package does not implement $method.
169           Fatal error: the specific package (or one of its superclasses) does
170           not implement this method where it should. This message means that
171           some other related classes do implement this method however the
172           class at hand does not.  Probably you should investigate this and
173           probably inform the author of the package.
174

SEE ALSO

176       This module is part of Mail-Message distribution version 3.012, built
177       on February 11, 2022. Website: http://perl.overmeer.net/CPAN/
178

LICENSE

180       Copyrights 2001-2022 by [Mark Overmeer <markov@cpan.org>]. For other
181       contributors see ChangeLog.
182
183       This program is free software; you can redistribute it and/or modify it
184       under the same terms as Perl itself.  See http://dev.perl.org/licenses/
185
186
187
188perl v5.36.0                      2022-07-22     Mail::Message::TransferEnc(3)
Impressum