The ContentID problem is fixed:
Added to IdMessage.pas:
--------------------
protected
FContentDisposition: string;
FFileIsTempFile: boolean;
FFileName: TFileName;
FCID: string; <= ADDED
//
function GetContentDisposition: string;
procedure SetContentDisposition(const Value: string);
public
* cut *
property FileName: TFileName read FFileName write FFileName;
property ContentID: string read FCID write FCID;
<= ADDED
end;
--------------------
Added to IdMessageClient.pas:
--------------------
function ProcessAttachment(ADecoder: TIdMessageDecoder):
TIdMessageDecoder;
* cut *
with TIdAttachment.Create(AMsg.MessageParts) do
begin
ContentType := ADecoder.Headers.Values['Content-Type'];
ContentTransfer :=
ADecoder.Headers.Values['Content-Transfer-Encoding'];
ContentID := ADecoder.Headers.Values['Content-ID'];
<= ADDED
Filename := ADecoder.Filename;
StoredPathname := LTempPathname;
end;
ADecoder.Free;
finally
FreeAndNil(LDestStream);
end;
end;
--------------------
Now I need only one more thing: the raw headers of the email.
And one more comment: why doesn't Indy remove it's temp files? There are
over 500 IndXX.tmp files in C:\Documents and Settings\*username*\Local
Settings\Temp !
"M. van Renswoude" <m...@no-spam.x2software.net> wrote in message
news:3c454c04_1@dnews...
Is Indy modifying the headers of the email? Everytime I view the headers of
an email received trough Indy (sent using OE), there is an 'X-something:
Indy 9' header, which is not in the original email.
Also, even more important: Indy eats the 'Content-ID' from attachments. I
need this badly, otherwise I can't parse HTML emails with inline images...
I'm using Indy 9.0.2b. I did modify IdMessageCodeMIME to stop crashing when
it receives a message which is not complete (so I could do the TOP X 100
command), but that has nothing to do with the headers...
Is this a bug in the decoder? Is there a way to retrieve the unmodified
headers?
Thanks in advance,
Mark van Renswoude