[mel-base-devel] mel.mime:parts not working properly for rfc 2822 (reading from a file)
Jochen Schmidt
js at crispylogics.com
Thu Jan 28 16:56:58 UTC 2010
Am 28.01.2010 um 17:49 schrieb Fred Gibson:
> Would that approach work with an alternative structure where both a
> text/plain and a text/html have the same boundary? I was thinking
> that the content-type would need to be used to get an exact part
> match.
No you use the part-number. This is a strict numbering on the same level. So if you scan for a part with part number 2 you have to skip the first found boundary.
>
> How about:
>
>> Given some part P with boundary B
>> 1) Locate the message object by following the parent chain
>> 2) Get a message-body-stream
>> 3) scan the stream for the boundary B
> 4) if boundary is found
> 5) process the content-type
> if content-type matches
> then return stream as part-stream
> else go to 3)
That isn't needed - the bodystructure (and the mel-base part objects) already contain the part-number.
ciao,
Jochen
More information about the mel-base-devel
mailing list