Importing from a multi-part MIME::Entity object fails to take notice
of content-disposition and content-type headers. This is a shame, as
they're quite important.
use Mail::Message::Convert::MimeEntity;
my $convert = Mail::Message::Convert::MimeEntity->new;
$top = MIME::Entity->build(From => 'me@xxxxxxxxxx',
To => 'you@xxxxxxxxxxxx',
Subject => "Hello, nurse!",
Data => "This is a test");
$top->attach(Filename => "foo.tex",
Type => "application/tex",
Encoding => "base64",
Data => "\\relax"
);
my $foo = $convert->from($top);
print $foo->head.$foo->body;
print "=== for comparison ===\n";
$top->print(\*STDOUT);
--
DISCLAIMER:
Use of this advanced computing technology does not imply an endorsement
of Western industrial civilization.
|