Board index » delphi » Sending graphics in an html mail using Indy

Sending graphics in an html mail using Indy

hi *,
Ok, sending html email with inline pictures and generating the header
content-id is no problem.
I searched a lot but everybody seems to have the problem sending
html-messages with inline pictures ...
I always get an empty string when trying to display the header
content-id from a retrieved message ?
Tested for hours generate headers, process headers assign headers ....
but no success
I think the only thing im doing wrong is to correctly assig the header
content-id before query it - but how .... ???
Here is my test code :

procedure TForm1.Button1Click(Sender: TObject);
var index : Integer;
       cid : String;
begin
   if idpop31.Connected then idpop31.Disconnect;
   idmessage1.Clear;
   idpop31.Connect();
   idpop31.Retrieve(StrToInt(edit1.Text), IDMessage1);
   Memo1.Lines.AddStrings(IDMessage1.Headers);
   Memo1.Lines.Add('-----------------------------------------');
   for Index:=0 to IDMessage1.MessageParts.Count-1 do begin
     cid:=
(TIDAttachment(IDMessage1.MessageParts.Items[index]).Headers.Values['Content-ID']);

      memo1.Lines.Add(cid);
     Memo1.Lines.Add('-----------------------------------------');
   end;
end;

example headers of message-part 4 of the message :

-Content-Type: image/jpeg;
         name="acer.jpg"
-Content-Transfer-Encoding: base64
-Content-ID: <thisiwanttoexcract>

what am i doing wrong ?

thanks in advance

 

Re:Sending graphics in an html mail using Indy


Quote
"mara goldbaum" <mara.goldb...@gmx.de> wrote in message

news:3D54E539.6010806@gmx.de...

Quote
> Ok, sending html email with inline pictures and generating the header
> content-id is no problem.
> example headers of message-part 4 of the message :

> -Content-Type: image/jpeg;
>          name="acer.jpg"
> -Content-Transfer-Encoding: base64
> -Content-ID: <thisiwanttoexcract>
> what am i doing wrong ?

I spent some time this AM looking at this.

As it turns out, you're not doing anything wrong.  Indy is sending the extra
headers just fine, but it is not handling them properly in TIdText and
TIdAttachment on receipt.  In fact it is dropping all items on receipt that
should go into extra headers.

Can you post the info in your message to the Indy bug page at
http://sourceforge.net/tracker/?func=add&group_id=41862&atid=431491 ?

--
Don Siders [Team Indy]

Visit the Indy Home page for updated source, documentation, and
articles. (http://www.nevrona.com/indy)

Join the Indy Docs project! (http://www.nevrona.com/indy/teams/docs)

ELKNews - Get your free copy at http://www.atozedsoftware.com

Re:Sending graphics in an html mail using Indy


ok, posted in category TIdAttachment.

is it hard to fix this bug ? i do want to display html-messages
with inline pictures ... ;)

mara

Don Siders [Team Indy] wrote:

Quote
> "mara goldbaum" <mara.goldb...@gmx.de> wrote in message
> news:3D54E539.6010806@gmx.de...

>>Ok, sending html email with inline pictures and generating the header
>>content-id is no problem.

>>example headers of message-part 4 of the message :

>>-Content-Type: image/jpeg;
>>         name="acer.jpg"
>>-Content-Transfer-Encoding: base64
>>-Content-ID: <thisiwanttoexcract>

>>what am i doing wrong ?

> I spent some time this AM looking at this.

> As it turns out, you're not doing anything wrong.  Indy is sending the extra
> headers just fine, but it is not handling them properly in TIdText and
> TIdAttachment on receipt.  In fact it is dropping all items on receipt that
> should go into extra headers.

> Can you post the info in your message to the Indy bug page at
> http://sourceforge.net/tracker/?func=add&group_id=41862&atid=431491 ?

> --
> Don Siders [Team Indy]

> Visit the Indy Home page for updated source, documentation, and
> articles. (http://www.nevrona.com/indy)

> Join the Indy Docs project! (http://www.nevrona.com/indy/teams/docs)

> ELKNews - Get your free copy at http://www.atozedsoftware.com

Other Threads