Re: Embedded pictures in email with Indy10

Giganews Newsgroups
Subject: Re: Embedded pictures in email with Indy10
Posted by:  Remy Lebeau \(Indy Team\) (re…
Date: Thu, 7 Apr 2011

"Louis Valmeras" <valmlou…> wrote in message

> I am trying to send an email with embedded pictures with Indy 10
> components.

Which version of Indy 10 are you using?

>      HtmlMessage->HtmlFiles->Add('c:\folder\image1.jpg');
>      HtmlMessage->HtmlFiles->Add('c:\folder\image2.jpg');

You are not specifying a ContentID for each image.  That is needed so the
HTML content has something to refer to in its <img> tags.  Depending on
which version of Indy you are actually using, TIdMessageBuilderHtml will
either use the filename as the ContentID by default, or it will leave the ID

> The pictures appear attached but not embedded. I think it is because I
> didn't
> specify the pictures ID. This option was not available in the Indy version
> on
> which this example is based.

No, but the article did explain that the attached filename was used as the
ID, that the HTML needed to use that ID, and even showed an example of it.
Later versions of Indy 10 support custom ContentID values.

Remy Lebeau (TeamB)


In response to

Embedded pictures in email with Indy10 posted by Louis Valmeras on Fri, 8 Apr 2011