How do I get the content-disposition of a MIME::Entity part

--001636e0a9bf052241049e34baee
Content-Type: text/plain; charset=ISO-8859-1

I have a simple code that gets all image parts of a message

foreach my $part($entity->parts){
next if ($part->effective_type !~
m{image});

push( [at] images,$part);

...

}

But I want to get only the inline images and not the attached images
How can I achieve this ?
$part->content_disposition() does not work







--
Thanks
Ram
<http://www.netcore.co.in/>




n <http://pragatee.com>

--001636e0a9bf052241049e34baee--
Ramprasad Prasad [ Fr, 11 März 2011 14:13 ] [ ID #2056449 ]

Re: How do I get the content-disposition of a MIME::Entity part

On Mar 11, 9:13 am, ramprasad... [at] gmail.com (Ramprasad Prasad) wrote:
> I have a simple code that gets all image parts of a message
>
> foreach my $part($entity->parts){
> next if ($part->effective_type !~
> m{image});
>
> push( [at] images,$part);
>
> ...
>
> }
>
> But I want to get only the inline images and not the attached images
> How can I achieve this ?
> $part->content_disposition() does not work
>
> --
> Thanks
> Ram
> <http://www.netcore.co.in/>
>
> n <http://pragatee.com>

hi,

it's probably too late, but... you can do this:

$header = $part->head();
$content_disp = $header->get('Content-Disposition');

that works for me...

karina


--
To unsubscribe, e-mail: beginners-unsubscribe [at] perl.org
For additional commands, e-mail: beginners-help [at] perl.org
http://learn.perl.org/
Koffie Verkeerd [ Mi, 20 April 2011 01:38 ] [ ID #2058433 ]
Perl » gmane.comp.lang.perl.beginners » How do I get the content-disposition of a MIME::Entity part

Vorheriges Thema: unable to remove the ./ when using File::Find::name
Nächstes Thema: Dynamic replacement of the variable