|Subject:||Re: Sending a file attachent from a Blob using TIdAttachmentMemory|
|Posted by:||Remy Lebeau \(TeamB\) (firstname.lastname@example.org)|
|Date:||Tue, 17 Jun 2008|
"Grant Brown" <gra…@sitedoc.com.au> wrote in message
> How do I send a email with a email attachment loaded from a TStream Obj.
One way would be to derive a custom class from TIdAttachment and have
> it use the original TStream directly.
> Is this the correct way to laod the file from the stream
That is one way to do it. Just know that doing so will make a copy of the
TStream data in memory. The larger the data, the more memory
TIdAttachmentMemory will use.
> 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
> or do I need to maintain it until the email has beem sent.
Only if you derive a new class from TIdAttachment.
Sending a file attachent from a Blob using TIdAttachmentMemory posted by Grant Brown on Wed, 11 Jun 2008