1Mail::Message::TransferUEsnecr(3C)ontributed Perl DocumeMnatialt:i:oMnessage::TransferEnc(3)
2
3
4
6 Mail::Message::TransferEnc - message transfer encoder/decoder
7
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
20 my Mail::Message $msg = ...;
21 my $decoded = $msg->decoded;
22 my $encoded = $msg->encode(transfer => 'base64');
23
25 This class is the base for various encoders and decoders, which are
26 used during transport of the message. This packages, and all which are
27 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 "base64" for binary information.
38
39 * Mail::Message::TransferEnc::SevenBit
40 "7bit" for plain old ASCII characters only.
41
42 * Mail::Message::TransferEnc::EightBit
43 "8bit" for extended character set data, not encoded.
44
45 * Mail::Message::TransferEnc::QuotedPrint
46 "quoted-printable" encdoded extended character set data.
47
49 Constructors
50
51 Mail::Message::TransferEnc->new(OPTIONS)
52
53 See "Constructors" in Mail::Reporter
54
55 The Encoder
56
57 Mail::Message::TransferEnc->addTransferEncoder(TYPE, CLASS)
58
59 Adds one new encoder to the list known by the Mail::Box suite. The
60 TYPE is found in the message's header in the "Content-Trans‐
61 fer-Encoding" field.
62
63 $obj->create(TYPE, OPTIONS)
64
65 Create a new coder/decoder based on the required type.
66
67 $obj->name
68
69 The name of the encoder. Case is not significant.
70
71 Encoding
72
73 $obj->check(BODY, OPTIONS)
74
75 Check whether the body is correctly encoded. If so, the body ref‐
76 erence is returned with the "checked" flag set. Otherwise, a new
77 object is created and returned.
78
79 Option --Default
80 result_type <type of source body>
81
82 . result_type CLASS
83
84 The type of the body to be produced, when the checker decides
85 to return modified data.
86
87 $obj->decode(BODY [, OPTIONS])
88
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
97 The type of the body to be produced, when the decoder decides
98 to return modified data.
99
100 $obj->encode(BODY, OPTIONS)
101
102 Use the encoder to encode the content of BODY.
103
104 Option --Default
105 result_type <type of source body>
106
107 . result_type CLASS
108
109 The type of the body to be produced, when the decoder decides
110 to return modified data.
111
112 Error handling
113
114 $obj->AUTOLOAD
115
116 See "Error handling" in Mail::Reporter
117
118 $obj->addReport(OBJECT)
119
120 See "Error handling" in Mail::Reporter
121
122 $obj->defaultTrace([LEVEL]⎪[LOGLEVEL, TRACELEVEL]⎪[LEVEL, CALLBACK])
123
124 Mail::Message::TransferEnc->defaultTrace([LEVEL]⎪[LOGLEVEL,
125 TRACELEVEL]⎪[LEVEL, CALLBACK])
126
127 See "Error handling" in Mail::Reporter
128
129 $obj->errors
130
131 See "Error handling" in Mail::Reporter
132
133 $obj->log([LEVEL [,STRINGS]])
134
135 Mail::Message::TransferEnc->log([LEVEL [,STRINGS]])
136
137 See "Error handling" in Mail::Reporter
138
139 $obj->logPriority(LEVEL)
140
141 Mail::Message::TransferEnc->logPriority(LEVEL)
142
143 See "Error handling" in Mail::Reporter
144
145 $obj->logSettings
146
147 See "Error handling" in Mail::Reporter
148
149 $obj->notImplemented
150
151 See "Error handling" in Mail::Reporter
152
153 $obj->report([LEVEL])
154
155 See "Error handling" in Mail::Reporter
156
157 $obj->reportAll([LEVEL])
158
159 See "Error handling" in Mail::Reporter
160
161 $obj->trace([LEVEL])
162
163 See "Error handling" in Mail::Reporter
164
165 $obj->warnings
166
167 See "Error handling" in Mail::Reporter
168
169 Cleanup
170
171 $obj->DESTROY
172
173 See "Cleanup" in Mail::Reporter
174
175 $obj->inGlobalDestruction
176
177 See "Cleanup" in Mail::Reporter
178
180 Error: Decoder for transfer encoding $type does not work: $@
181
182 Compiling the required transfer encoding resulted in errors, which
183 means that the decoder can not be used.
184
185 Warning: No decoder for transfer encoding $type.
186
187 A decoder for the specified type of transfer encoding is not imple‐
188 mented.
189
190 Error: Package $package does not implement $method.
191
192 Fatal error: the specific package (or one of its superclasses) does not
193 implement this method where it should. This message means that some
194 other related classes do implement this method however the class at
195 hand does not. Probably you should investigate this and probably
196 inform the author of the package.
197
199 This module is part of Mail-Box distribution version 2.070, built on
200 March 25, 2007. Website: http://perl.overmeer.net/mailbox/
201
203 Copyrights 2001-2007 by Mark Overmeer.For other contributors see
204 ChangeLog.
205
206 This program is free software; you can redistribute it and/or modify it
207 under the same terms as Perl itself. See
208 http://www.perl.com/perl/misc/Artistic.html
209
210
211
212perl v5.8.8 2007-03-25 Mail::Message::TransferEnc(3)