NAME

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

CLASS INHERITANCE

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

SYNOPSIS

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

DESCRIPTION

This class is the base for various encoders and decoders, which are used during transport of the message. This packages, and all which are derived, are invoked by the message's Mail::Message::decoded() and Mail::Message::encode() methods:

my $message = $folder->message(3);
my $decoded_body = $message->decoded;
my $encoded_body = $message->encode(transfer => 'base64');

The following coders/decoders are currently available:

  • base64 via Mail::Message::TransferEnc::Base64

  • 7bit via Mail::Message::TransferEnc::SevenBit

  • 8bit via Mail::Message::TransferEnc::EightBit

  • quoted-printable via Mail::Message::TransferEnc::QuotedPrint

METHODS

Initiation

new OPTIONS
OPTION               DEFAULT
log                  'WARNINGS'
trace                'WARNINGS'
log => LEVEL

See Mail::Reporter::new(log)

trace => LEVEL

See Mail::Reporter::new(trace)

The Encoder

addTransferEncoder TYPE, CLASS

(Class method) 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.

create TYPE, OPTIONS

Create a new coder/decoder based on the required type.

name

The name of the encoder. Case is not significant.

Encoding

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.

OPTION               DEFAULT
result_type          <type of source body>
result_type => CLASS

The type of the body to be produced, when the checker decides to return modified data.

decode BODY [, OPTIONS]

Use the encoder to decode the content of BODY. A new body is returned.

OPTION               DEFAULT
result_type          <type of source body>
result_type => CLASS

The type of the body to be produced, when the decoder decides to return modified data.

encode BODY, OPTIONS

Use the encoder to encode the content of BODY.

OPTION               DEFAULT
result_type          <type of source body>
result_type => CLASS

The type of the body to be produced, when the decoder decides to return modified data.

Logging and Tracing

defaultTrace [LEVEL, [LEVEL]

See Mail::Reporter::defaultTrace()

errors

See Mail::Reporter::errors()

log [LEVEL [,STRINGS]]

See Mail::Reporter::log()

report [LEVEL]

See Mail::Reporter::report()

reportAll [LEVEL]

See Mail::Reporter::reportAll()

trace [LEVEL]

See Mail::Reporter::trace()

warnings

See Mail::Reporter::warnings()

Other Methods

AUTOLOAD

See Mail::Reporter::AUTOLOAD()

DESTROY

See Mail::Reporter::DESTROY()

inGlobalDestruction

See Mail::Reporter::inGlobalDestruction()

logPriority LEVEL

See Mail::Reporter::logPriority()

logSettings

See Mail::Reporter::logSettings()

notImplemented

See Mail::Reporter::notImplemented()

SEE ALSO

A good start to read is Mail::Box-Overview. More documentation and a mailinglist are available from the project's website at http://perl.overmeer.net/mailbox/.

AUTHOR

Mark Overmeer (mark@overmeer.net) with the help of many.

VERSION

This code is beta, version 2.022.

Copyright (c) 2001-2002 Mark Overmeer. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.