Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Email::MIME bug?

by Arik123 (Beadle)
on Jul 06, 2021 at 09:52 UTC ( #11134694=perlquestion: print w/replies, xml ) Need Help??

Arik123 has asked for the wisdom of the Perl Monks concerning the following question:

I'm parsing a multipart MIME email, which contains the line:

Content-Type: image/png; name="=?UTF-8?B?15DXmdeZ15PXmSDXqNeWLnBuZw==?="

My code contains:

$email = Email::MIME->new (\$msg); $email->walk_parts( sub { return if $_[0]->subparts; print $_[0]->filename; } );

This produces the following warning:

Unquoted '"' not allowed at ./ line 21. Missing semicolon before parameter '"אייד&#149 +7; רז.png"' at ./ line 21.

I think it happens only on utf8 filenames, and I think it's a bug. What do you think?

Replies are listed 'Best First'.
Re: Email::MIME bug?
by hippo (Bishop) on Jul 06, 2021 at 09:58 UTC

    Sounds like this. Maybe look at the mentioned PRs?


      Not exactly. His problem arised at new(), and my problem arised at filename(). My call to new() went without a problem, as my Email::MIME already contained his patch.

      However, following his example, I patched the filename() method, and my problem vanished. I changed

       my $dis = $self->header("Content-Disposition") || '';


       my $dis = $self->header_raw("Content-Disposition") || '';

      In my Email::MIME, it's in line 453.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://11134694]
Front-paged by Corion
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (2)
As of 2023-02-06 06:18 GMT
Find Nodes?
    Voting Booth?
    I prefer not to run the latest version of Perl because:

    Results (33 votes). Check out past polls.