Newsgroups : Borland : borland.public.delphi.internet.winsock : 2008 Feb : Re: AlphaImageLoader?
| Subject: | Re: AlphaImageLoader? |
| Posted by: | "Richard Bibby" (richard.bib..@profdoc.com) |
| Date: | Thu, 14 Feb 2008 09:32:39 |
Hej,
OK I forgot to tell yo that I had edited the html so that it contained a
CID. So its like this:
<div class="adht4em64kkcw-0" nowrap="true"
style="z-index:25;top:3265px;left:35px;width:699px;height:283px;"><div
style="width:699px;height:283px;display:inline-block;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true,sizingMethod=scale,src='cid:a1');"></div></div>
and I made the change in the code to put the content-id in <> brackets like
this:
with TIdAttachmentFile.Create(Mail.MessageParts, Attachment ) do
begin
ContentType := 'image/png' ;
AttachFileName := ExtractFilename( Attachment );
ContentID := '<a1>' ;
FileName := AttachFileName ;
end;
but without success.
BTW you example does not use <>. Is that a mistake or is there some good
reason behind it.
I am going to try and add a text only segment to the message to see if that
helps...
Any other ides?
"Remy Lebeau (TeamB)" <no.spam@no.spam.com> wrote in message
news:47b3392f$1@newsgroups.borland.com...
>
> "Richard Bibby" <richard.bibby@profdoc.com> wrote in message
> news:47b2f7f5$1@newsgroups.borland.com...
>
>> I am unable to change the html because is it created by Crystal Reports
>
> The HTML must be changed in this situation in order to work in emails.
> Yes, you can change it. You will just have to parse/update the HTML
> yourself after Crystal Reports generates it. You already have the HTML
> loaded in memory before you give it to the TIdMessage.
>
>> it does not have the cid syntax you refer to.
>
> It is not supposed to. The "cid" syntax applies to HTML in emails only.
> Crystal Reports has no way of knowing how its HTML will be used, so it
> generates normal HTML with normal URL references to external files. You
> have to change the HTML manually
>
>> Everything worked ok until the html started to include the reference
>> to the AlphaImageLoader.....
>
> The original HTML was still wrong. Most email readers that support HTML
> require the "cid" syntax. MSOutlook is more lenient about that, but
> others are not.
>
>> why should the html do that... is it dependant on the environment?
>
> Like I said before, that machine likely has a different version of Crystal
> Reports installed, or a different version of whatever engine Crystal
> Reports uses internally to create the HTML.
>
>> ContentID := AttachFileName ;
>
> You need to surround the ID with angle brackets, ie:
>
> ContentID := '<' + AttachFileName + '>';
>
>
> Gambit
none