Re: Inline Graphics

Giganews Newsgroups
Subject: Re: Inline Graphics
Posted by:  Remy Lebeau \(Indy Team\) (no.spam@no.spam.com)
Date: Mon, 11 Feb 2008

"Alan McDonald" <al…@meta.com.au> wrote in message
news:B0FB7ADE4448E340al…@meta.com.au...

> 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:

    HTML Messages
  http://www.indyproject.org/Sockets/Blogs/RLebeau/2005_08_17_A.EN.aspx

    New HTML Message Builder class
  http://www.indyproject.org/Sockets/Blogs/RLebeau/20080116.EN.aspx

Gambit

Replies

In response to

Inline Graphics posted by Alan McDonald on Tue, 12 Feb 2008