Mail::Message::Convert - conversions between message types
Mail::Message::Convert is a Mail::Reporter
use Mail::Message::Convert::SomeThing; my $convert = Mail::Message::Convert::SomeThing->new; my Mail::Message $msg = Mail::Message->new; my SomeThing $other = $convert->export($msg); my SomeThing $other = SomeThing->new; my Mail::Message $msg = $convert->from($other); use Mail::Box::Manager; my $mgr = Mail::Box::Manager->new; my $folder = $mgr->open(folder => 'Outbox'); $folder->addMessage($other);
This class is the base for various message converters, which can be used to translate to and from Mail::Message objects.
Mail::Message
You do not have to convert into a Mail::Message explicitly, when you want to add a foreign message to Mail::Box folder.
Mail::Box
The following converters are currently available:
Mail::Message::Convert::MailInternet
Converts the simple Mail::Internet messages into Mail::Message objects.
Mail::Internet
Mail::Message::Convert::MimeEntity
Converts the more complicated MIME::Entity messages into Mail::Message objects.
MIME::Entity
Methods prefixed with an abbreviation are described in Mail::Reporter (MR).
The general methods for Mail::Message::Convert objects:
Mail::Message::Convert
MR errors MR new OPTIONS export MESSAGE, OPTIONS MR report [LEVEL] from OBJECT, OPTIONS MR reportAll [LEVEL] MR log [LEVEL [,STRINGS]] MR trace [LEVEL]
The extra methods for extension writers:
MR AUTOLOAD MR logPriority LEVEL MR DESTROY MR logSettings MR inGlobalDestruction MR notImplemented
Returns a new message object based on the information from a Mail::Message object. The MESSAGE specified is an instance of a Mail::Message.
Examples:
my $convert = Mail::Message::Convert::SomeThing->new; my Mail::Message $msg = Mail::Message->new; my SomeThing $other = $convert->export($msg);
Returns a new Mail::Message object based on the information from an message-type which is strange to the Mail::Box set of modules.
my $convert = Mail::Message::Convert::SomeThing->new; my SomeThing $other = SomeThing->new; my Mail::Message $msg = $convert->from($other);
Mail::Box-Overview
Mark Overmeer (mailbox@overmeer.net). All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
This code is beta, version 2.010.
Copyright (c) 2001 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.
To install Mail::Box, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mail::Box
CPAN shell
perl -MCPAN -e shell install Mail::Box
For more information on module installation, please visit the detailed CPAN module installation guide.