{
    "mode": "perldoc",
    "parameter": "Mail::Message::TransferEnc",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/Mail%3A%3AMessage%3A%3ATransferEnc/json",
    "generated": "2026-06-16T06:30:09Z",
    "synopsis": "my Mail::Message $msg = ...;\nmy $decoded = $msg->decoded;\nmy $encoded = $msg->encode(transfer => 'base64');",
    "sections": {
        "NAME": {
            "content": "Mail::Message::TransferEnc - message transfer encoder/decoder\n",
            "subsections": []
        },
        "INHERITANCE": {
            "content": "Mail::Message::TransferEnc\nis a Mail::Reporter\n\nMail::Message::TransferEnc is extended by\nMail::Message::TransferEnc::Base64\nMail::Message::TransferEnc::Binary\nMail::Message::TransferEnc::EightBit\nMail::Message::TransferEnc::QuotedPrint\nMail::Message::TransferEnc::SevenBit\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "my Mail::Message $msg = ...;\nmy $decoded = $msg->decoded;\nmy $encoded = $msg->encode(transfer => 'base64');\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "This class is the base for various encoders and decoders, which are used during transport of the\nmessage. These packages, and all which are derived, are invoked by the message's\nMail::Message::decoded() and Mail::Message::encode() methods:\n\nmy $message = $folder->message(3);\nmy $decodedbody = $message->decoded;\nmy $encodedbody = $message->encode(transfer => 'base64');\n\nThe following coders/decoders are currently available:\n\n*   Mail::Message::TransferEnc::Base64\n\n\"base64\" for binary information.\n\n*   Mail::Message::TransferEnc::SevenBit\n\n\"7bit\" for plain old ASCII characters only.\n\n*   Mail::Message::TransferEnc::EightBit\n\n\"8bit\" for extended character set data, not encoded.\n\n*   Mail::Message::TransferEnc::QuotedPrint\n\n\"quoted-printable\" encdoded extended character set data.\n\nExtends \"DESCRIPTION\" in Mail::Reporter.\n",
            "subsections": []
        },
        "METHODS": {
            "content": "Extends \"METHODS\" in Mail::Reporter.\n",
            "subsections": [
                {
                    "name": "Constructors",
                    "content": "Extends \"Constructors\" in Mail::Reporter.\n\nMail::Message::TransferEnc->new(%options)\nInherited, see \"Constructors\" in Mail::Reporter\n"
                },
                {
                    "name": "The Encoder",
                    "content": "Mail::Message::TransferEnc->addTransferEncoder($type, $class)\nAdds one new encoder to the list known by the Mail::Box suite. The $type is found in the\nmessage's header in the \"Content-Transfer-Encoding\" field.\n\n$obj->create($type, %options)\nCreate a new coder/decoder based on the required type.\n\n$obj->name()\nThe name of the encoder. Case is not significant.\n"
                },
                {
                    "name": "Encoding",
                    "content": "$obj->check($body, %options)\nCheck whether the body is correctly encoded. If so, the body reference is returned with the\n\"checked\" flag set. Otherwise, a new object is created and returned.\n\n-Option     --Default\nresulttype  <type of source body>\n\nresulttype => CLASS\nThe type of the body to be produced, when the checker decides to return modified data.\n\n$obj->decode($body, %options)\nUse the encoder to decode the content of $body. A new body is returned.\n\n-Option     --Default\nresulttype  <type of source body>\n\nresulttype => CLASS\nThe type of the body to be produced, when the decoder decides to return modified data.\n\n$obj->encode($body, %options)\nUse the encoder to encode the content of $body.\n\n-Option     --Default\nresulttype  <type of source body>\n\nresulttype => CLASS\nThe type of the body to be produced, when the decoder decides to return modified data.\n"
                },
                {
                    "name": "Error handling",
                    "content": "Extends \"Error handling\" in Mail::Reporter.\n\n$obj->AUTOLOAD()\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->addReport($object)\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->defaultTrace( [$level]|[$loglevel, $tracelevel]|[$level, $callback] )\nMail::Message::TransferEnc->defaultTrace( [$level]|[$loglevel, $tracelevel]|[$level, $callback]\n)\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->errors()\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->log( [$level, [$strings]] )\nMail::Message::TransferEnc->log( [$level, [$strings]] )\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->logPriority($level)\nMail::Message::TransferEnc->logPriority($level)\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->logSettings()\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->notImplemented()\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->report( [$level] )\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->reportAll( [$level] )\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->trace( [$level] )\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->warnings()\nInherited, see \"Error handling\" in Mail::Reporter\n"
                },
                {
                    "name": "Cleanup",
                    "content": "Extends \"Cleanup\" in Mail::Reporter.\n\n$obj->DESTROY()\nInherited, see \"Cleanup\" in Mail::Reporter\n"
                }
            ]
        },
        "DIAGNOSTICS": {
            "content": "Error: Decoder for transfer encoding $type does not work: $@\nCompiling the required transfer encoding resulted in errors, which means that the decoder\ncan not be used.\n\nWarning: No decoder for transfer encoding $type.\nA decoder for the specified type of transfer encoding is not implemented.\n\nError: Package $package does not implement $method.\nFatal error: the specific package (or one of its superclasses) does not implement this\nmethod where it should. This message means that some other related classes do implement this\nmethod however the class at hand does not. Probably you should investigate this and probably\ninform the author of the package.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "This module is part of Mail-Message distribution version 3.012, built on February 11, 2022.\nWebsite: http://perl.overmeer.net/CPAN/\n",
            "subsections": []
        },
        "LICENSE": {
            "content": "Copyrights 2001-2022 by [Mark Overmeer <markov@cpan.org>]. For other contributors see ChangeLog.\n\nThis program is free software; you can redistribute it and/or modify it under the same terms as\nPerl itself. See http://dev.perl.org/licenses/\n",
            "subsections": []
        }
    },
    "summary": "Mail::Message::TransferEnc - message transfer encoder/decoder",
    "flags": [],
    "examples": [],
    "see_also": []
}