Re: Remove the header in multipart body?

"V.R.P. Prasad" <[email protected]> Mon, 6 Jun 2005 17:52:25 +0000 (UTC)
Newsgroups gmane.comp.lang.perl.modules.mail-box
Message-ID <043c01c56bee$87b2d600$9b01a8c0@vrpprasad>
Hi Mark,
           Thanks for your prompt reply. But as per my requirement I can't
skip all the Nested & Multipart messages.Depends on attachment I have to do
further processing. If I skip the $part->isMultipart || $part->isNested;
messages how can I get the Body as it was coming only in @parts mentioned
below.
Thanks
Prasad.


----- Original Message ----- 
From: "Mark Overmeer" <[email protected]>
To: "V.R.P. Prasad" <[email protected]>
Cc: "Mail-Box Mailinglist" <[email protected]>
Sent: Monday, June 06, 2005 10:27 AM
Subject: Re: Remove the header in multipart body?


> * V.R.P. Prasad ([email protected]) [050606 19:09]:
> > Hi,
> >    I am accessing multipart messages using
> >            my @parts = $mail->parts('ALL');
> >
> >   foreach  part(attachment) I am accessing using
> >             $encodebody = $partmsg->body;
> >             $decodebody = $part_encoded_body->decoded ;
> >
> > But sometimes Body of the parent mail will come as multipart so getting
all the headers
>
> If I understand you correctly, then my answer is "of course".  There are
> two special kinds of bodies: the "mulitpart" and the "nested".  You need
> to leave them out...
>
>    foreach my $part ($mail->parts('ALL'))
>    {   next if $part->isMultipart || $part->isNested;
>        ...
>    }
>
> -- 
>                MarkOv
>
> ------------------------------------------------------------------------
> drs Mark A.C.J. Overmeer                                MARKOV Solutions
>        [email protected]                          [email protected]
> http://Mark.Overmeer.net                   http://solutions.overmeer.net