Re: body html's image shown as attach in yahoo email

Giganews Newsgroups
Subject: Re: body html's image shown as attach in yahoo email
Posted by:  Aj (andrewjslei…@yahoo.co.uk)
Date: Sat, 5 Jul 2003

Hi Tarvirdi,

I have been looking for some code to do this myself for a while!!!! I have
had a look at your code and made some changes (See code below) which now
seem to work for myself:

* I have ADDED the background.gif as another message part
* I have ADDED "" to the background=
* I have made all the file names lowercase

Cheers and hope this helps yourself,

Aj
(Now VERY happy)

// html body with reference to inline image

with TIdText.Create(IdMessage1.MessageParts) do begin

ContentType := 'text/html';

body.add('<HTML><HEAD>' +

'<META http-equiv=Content-Language content=en-us>' +

'<META http-equiv=Content-Type content="text/html; charset=windows-1256">' +

'</HEAD>' +

'<BODY bgcolor=#ffffff background="cid:background.gif">' +

'<P dir=rtl align=center><IMG alt="" hspace=0 src="cid:logo.gif"
align=baseline border=0></P>' +

'<P dir=rtl><span lang="fa"><font face="Tahoma"
size="4">CODE</font></span></P>' +

'<P dir=ltr><FONT face=Tahoma size=4>Your account''s transaction is
attached</FONT></P>' +

'</BODY></HTML>');

end;

with TIdAttachment.Create(IdMessage1.MessageParts, 'background.gif') do
begin

ContentType := 'image/gif';

ContentDisposition := 'inline';

ExtraHeaders.Values['content-id'] := 'background.gif';

end;

with TIdAttachment.Create(IdMessage1.MessageParts, 'logo.gif') do begin

ContentType := 'image/gif';

ContentDisposition := 'inline';

ExtraHeaders.Values['content-id'] := 'logo.gif';

end;

"Tarvirdi" <mt…@koasr.net> wrote in message
news:<BC1C27A37474E240mt…@koasr.net>...

> I have created an email by TIdMessage as bellow that sends "main.htm" with
a

> image as "logo.gif".

> But sent email's image (logo.gif) shown in yahoo as a attached file.

> what should I correct?

> Tarvirdi

Replies

None

In response to

body html's image shown as attach in yahoo email posted by Tarvirdi on Mon, 23 Jun 2003