[Mimedefang] Constructing MIME::Entity via new

Philip Prindeville philipp_subx at redfish-solutions.com
Thu May 2 18:55:38 EDT 2013

On May 1, 2013, at 5:36 PM, Philip Prindeville <philipp_subx at redfish-solutions.com> wrote:

> On Apr 30, 2013, at 1:51 PM, David F. Skoll <dfs at roaringpenguin.com> wrote:
>> I use MIME::Entity->build(...), but I'll have a look at why
>> new(...) seems to be misbehaving.

On a slightly related vein, I tried to do a workaround the following way:

my $parser = MIME::Parser->new();


for (my $i = 1; $i <= $msgs; ++$i, $parser->filer->purge) {
  my $lines = $pop->top($i, 0);

  my $msg = $parser->parse_data($lines);

but it turns out that this blows out with:

error:    unexpected end of header

I'm guessing because we have a "Content-Type: … ; boundary=…" line, and we never see a closing boundary.

Would it be possible to add a flag that allows the parse_* methods to succeed in the absence of body text?



More information about the MIMEDefang mailing list