how to use TIdDecoderMIME

Giganews Newsgroups
Subject: how to use TIdDecoderMIME
Posted by:  Eugene Goldberg (ego…@mts-nn.ru)
Date: Tue, 9 Dec 2003

HI,

I am using the following code:

      DeMIME := TIdDecoderMIME.Create(nil);
      ms := TMemoryStream.Create;
      try
        DeMIME.DecodeBegin(ms);
        DeMIME.Decode(MimedFile, 1, Length(MimedFile));
        TIdAttachmentMemory.Create(FMessage.MessageParts, ms).FileName :=
CurrentFileName;
      finally
        DeMIME.DecodeEnd;
        DeMIME.Free
      end

MimedFile is a string which contains MIMEd image of attachment.
I need to be able to create attachment from memory without saving to local
file.
DeMIME.Decode hangs...Using Indy 10.00.17-B with Delphi 5.

Thanx,
Eugene.

Replies