Mail::Message::TransferEnc - message transfer encoder/decoder
| Use Case | Command | Description |
|---|---|---|
| Decode message body | $msg->decoded | Get body with transfer encoding decoded |
| Encode message body | $msg->encode(transfer => 'base64') | Encode body with specified transfer encoding |
| Add custom encoder | Mail::Message::TransferEnc->addTransferEncoder($type, $class) | Register a new encoder type |
| Create encoder instance | $obj->create($type, %options) | Instantiate a coder/decoder for a type |
| Check body encoding | $obj->check($body, %options) | Verify and optionally re-encode body |
Mail::Message::TransferEnc is a Mail::Reporter
Mail::Message::TransferEnc is extended by Mail::Message::TransferEnc::Base64, Mail::Message::TransferEnc::Binary, Mail::Message::TransferEnc::EightBit, Mail::Message::TransferEnc::QuotedPrint, Mail::Message::TransferEnc::SevenBit
my Mail::Message $msg = ...;
my $decoded = $msg->decoded;
my $encoded = $msg->encode(transfer => 'base64');
This class is the base for various encoders and decoders, which are used during transport of the message. These packages, and all which are derived, are invoked by the message's decoded() and encode() methods:
my $message = $folder->message(3);
my $decoded_body = $message->decoded;
my $encoded_body = $message->encode(transfer => 'base64');
Extends "DESCRIPTION" in Mail::Reporter.
Extends "METHODS" in Mail::Reporter.
Extends "Constructors" in Mail::Reporter.
Mail::Message::TransferEnc->new(%options) โ Inherited, see "Constructors" in Mail::Reporter.Mail::Message::TransferEnc->addTransferEncoder($type, $class) โ Adds one new encoder to the list known by the Mail::Box suite. The $type is found in the message's header in the "Content-Transfer-Encoding" field.$obj->create($type, %options) โ Create a new coder/decoder based on the required type.$obj->name() โ The name of the encoder. Case is not significant.$obj->check($body, %options) โ Check whether the body is correctly encoded. If so, the body reference is returned with the "checked" flag set. Otherwise, a new object is created and returned.
result_type โ Default: <type of source body>result_type => CLASS โ The type of the body to be produced, when the checker decides to return modified data.$obj->decode($body, %options) โ Use the encoder to decode the content of $body. A new body is returned.
result_type โ Default: <type of source body>result_type => CLASS โ The type of the body to be produced, when the decoder decides to return modified data.$obj->encode($body, %options) โ Use the encoder to encode the content of $body.
result_type โ Default: <type of source body>result_type => CLASS โ The type of the body to be produced, when the decoder decides to return modified data.Extends "Error handling" in Mail::Reporter.
$obj->AUTOLOAD() โ Inherited, see "Error handling" in Mail::Reporter.$obj->addReport($object) โ Inherited, see "Error handling" in Mail::Reporter.$obj->defaultTrace([$level]|[$loglevel, $tracelevel]|[$level, $callback]) โ Inherited, see "Error handling" in Mail::Reporter.Mail::Message::TransferEnc->defaultTrace(...) โ Inherited, see "Error handling" in Mail::Reporter.$obj->errors() โ Inherited, see "Error handling" in Mail::Reporter.$obj->log([$level, [$strings]]) โ Inherited, see "Error handling" in Mail::Reporter.Mail::Message::TransferEnc->log(...) โ Inherited, see "Error handling" in Mail::Reporter.$obj->logPriority($level) โ Inherited, see "Error handling" in Mail::Reporter.Mail::Message::TransferEnc->logPriority($level) โ Inherited, see "Error handling" in Mail::Reporter.$obj->logSettings() โ Inherited, see "Error handling" in Mail::Reporter.$obj->notImplemented() โ Inherited, see "Error handling" in Mail::Reporter.$obj->report([$level]) โ Inherited, see "Error handling" in Mail::Reporter.$obj->reportAll([$level]) โ Inherited, see "Error handling" in Mail::Reporter.$obj->trace([$level]) โ Inherited, see "Error handling" in Mail::Reporter.$obj->warnings() โ Inherited, see "Error handling" in Mail::Reporter.Extends "Cleanup" in Mail::Reporter.
$obj->DESTROY() โ Inherited, see "Cleanup" in Mail::Reporter.This module is part of Mail-Message distribution version 3.012, built on February 11, 2022. Website: http://perl.overmeer.net/CPAN/
Copyrights 2001-2022 by [Mark Overmeer <markov AT cpan.org>]. For other contributors see ChangeLog.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See http://dev.perl.org/licenses/
Generated by phpman v4.9.25-25-g40dbf62 · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-07-16 12:37 @2600:1f28:365:80b0:8802:8bb4:3873:328e
CrawledBy CCBot/2.0 (https://commoncrawl.org/faq/)
Enhanced by LLM: deepseek-v4-flash / taotoken.net / www.chedong.com - original format