* Basil Daoust <[EMAIL PROTECTED]> [2008-06-25T22:23:07]
> > You want something like:
> >
> > my $root = Email::MIME->new($message_text);
> > my ($html_part) = grep { $_->content_type =~ m{^text/html} }
> > $root->subparts;
> >
> > my $encoded_html = $html_part->body;
> > my $html = Encode::dec
I thought I'd cc the list since this is sort of a weird, fun bug.
Sometimes, when collapsing a message into single part, the C-T is horked up.
It starts as:
Content-Type: multipart/related; boundary=xyzzy; type=foo
...and ends as:
Content-Type: text/plain; boundary=xyzzy; type=foo
Erk!
* Ricardo SIGNES <[EMAIL PROTECTED]> [2008-06-26T13:37:09]
> Demonstration attached.
Thanks, ezmlm. Here it is:
use strict;
use MIME::Parser;
# my $entity = MIME::Parser->new->parse_open('bizarre.msg');
my $entity = MIME::Parser->new->parse(\*DATA);
sub cleanup_mime {
my ($entity) = @_;
fo
(Dangitall, if 7-bit ASCII was good enough for Fidonet, it ought to be
good enough for email. Kids these days.)
I'm getting this when I try to retrieve
$SomeEmailMimeMessage->header('subject'):
Unknown encoding "X-UNKNOWN" at /usr/lib/perl/5.8/Encode.pm line 166
A fair cop, the subject line *d
* Karen Cravens <[EMAIL PROTECTED]> [2008-06-26T15:38:17]
> (Dangitall, if 7-bit ASCII was good enough for Fidonet, it ought to be good
> enough for email. Kids these days.)
>
> I'm getting this when I try to retrieve
> $SomeEmailMimeMessage->header('subject'):
>
> Unknown encoding "X-UNKNOWN" at
On Thu, 26 Jun 2008, Ricardo SIGNES wrote:
RS>Wow. I had never noticed this bit of HORRIBLENESS before.
Um... thanks?
RS>Email::MIME, once again, is shown to be useful for a very, very small set of
RS>email. That is, email that is not wrong; all correct email won't work
either,
RS>but this em