I know the answer to this is going to make me feel a moron but I need help.
I've been working on my mime parser to get it to pass the torture tests and was
pretty much there. I made a couple of alterations, was called out to help my
wife in the garden and I've spent the last four hours trying to figure out what
I did to stop things working.
The two procedures are my code at its simplest. On my easy test case which
should have a block of html text and a block of plain text I get nothing. Its
no longer walking the tree, and my brain is to tired to figure out why.
procedure Tform1.walkdown(bit: TMimepart);
var
MimeChunk: TMimePart;
cntr: integer;
begin
memo2.lines.add('walking...');
for cntr := 0 to bit.GetSubPartCount - 1 do begin
mimechunk := bit.GetSubPart(cntr);
mimechunk.DecodePart;
if LowerCase(MimeChunk.Primary) = 'multipart' then walkdown(mimechunk)
else memo2.lines.add(' ' + mimechunk.Primary + '/' + mimechunk.Secondary);
end;
end;
procedure TForm1.Button4Click(Sender: TObject);
var
MimeChunk: TMimePart;
cntr: integer;
begin
memo2.lines.clear;
HTMLFound := False;
MimeToDecode.Clear;
MimeToDecode.Lines.Assign(Memo1.Lines);
MimeToDecode.DecodeMessage;
for cntr := 0 to MimeToDecode.MessagePart.GetSubPartcount - 1 do begin
MimeChunk := MimeToDecode.MessagePart.GetSubPart(cntr);
MimeChunk.DecodePart;
if LowerCase(MimeChunk.Primary) = 'multipart' then walkdown(mimechunk)
else memo2.lines.add('top ' + mimechunk.Primary + '/' + mimechunk.Secondary);
end;
end;Roy Lambert
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
synalist-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/synalist-public