rjbs / Email-Abstract

Email::Abstract perl module
2 stars 2 forks source link

Does not always get the full body of Email::MIME #3

Closed mvz closed 9 years ago

mvz commented 10 years ago

The following program illustrates the problem. It prints an empty line instead of the expected multipart body.

use Email::Abstract;
use Email::MIME;

my $plain = Email::MIME->create(
  attributes => {
    content_type => "text/plain",
    charset => "ISO-8859-1",
    disposition => "inline",
    encoding => "8bit",
  },
  body => "plain body"
);

my $html = Email::MIME->create(
  attributes => {
    content_type => "text/html",
    disposition => "inline",
    encoding => "8bit",
  },
  body => "html body"
);

my $m = Email::MIME->create(
  attributes => {
    content_type => "multipart/alternative",
    encoding => "8bit",
  },
  parts => [$plain, $html]
);

my $a = Email::Abstract->new($m);

print $a->get_body;
rjbs commented 9 years ago

Blech. Well, it's now fixed in a new release.

The body-handling bits of the Abstract API are not well-conceived. :(

Thanks for the report!

mvz commented 9 years ago

Thanks for fixing this!