|Subject:||Re: Inline Graphics|
|Posted by:||Remy Lebeau \(Indy Team\) (email@example.com)|
|Date:||Mon, 11 Feb 2008|
"Alan McDonald" <al…@meta.com.au> wrote in message
> I use the components fine for multipartr HTML emails with
> attachements, but I'd like to put a grphic in my email header
> which is actually inline and not just referenced via the html
> src tag.
Inlined vs non-inlined images are no different from each other as far as
Indy is conserned. They are still attachments like any other. Simply set
the TIdAttachment.ContentDisposition property to 'inline', and the email
reader will handle the rest on its end.
> PS I do this sort of thing - so I imagine that an inline grphic is another
> part but I also need to reference it in the body text somehow,.
You reference it in exactly the same way as any other MIME attachment -
assign a value to the TIdAttachment.ContentID property, and then refer to
that ID in your HTML using the "cid" syntax (neither of which you are doing
in the code you showed).
I suggest you read my blog articles about HTML messages:
New HTML Message Builder class
Inline Graphics posted by Alan McDonald on Tue, 12 Feb 2008