Sending a file attachent from a Blob using TIdAttachmentMemory

Giganews Newsgroups
Subject: Sending a file attachent from a Blob using TIdAttachmentMemory
Posted by:  Grant Brown (gra…@sitedoc.com.au)
Date: Wed, 11 Jun 2008

Hi,

Using Indy 10.1.1 and Delphi 2006

How do I send a email with a email attachment loaded from a TStream Obj.

Is this the correct way to laod the file from the stream

My_Stream.Seeak(0);
TIdAttachmentMemory.Create(MesgPkt.MessageParts, My_Stream);

Do I need to doing any thing to the stream prior to laoding the
attachment.

As soon as the above returns am I then free to clean up and free the
TStream or do I need to maintain it until the email has beem sent.

Kind Regards
Grant Brown

--

Replies