Como faço?

Delphi

14/09/2007

[color=red:b7ebc9142a]Tópico bloqueado por Massuda Tópico duplicado. Por favor, mantenha a discussão no tópico original... http://forum.devmedia.com.br/viewtopic.php?t=89963[/color:b7ebc9142a]

Olá!!

Tenho o código abaixo...

-------------------------------------------------------------------------
// Texto HTML
newText := TIdText.Create(IdMsgSend.MessageParts);
newText.ContentType:=´text/html´;
newText.Body.Add(´<HTML><BODY>´);
newText.Body.Add(´<BR><BR>´);
newText.Body.Add(´<IMG SRC=´cid:google.gif´>´);
newText.Body.Add(´</BODY><HTML>´);

// Anexa a imagem ao corpo do email
newText := TIdText.Create(IdMsgSend.MessageParts);
newText.ContentType := ´text/plain´;
newAttach := TIdAttachment.Create(IdMsgSend.MessageParts,´google.gif´);
newAttach.ExtraHeaders.Values[´Content-ID´] := ´google.gif´;
-------------------------------------------------------------------------

E agora, como faço para, ao invés de deixar a parte ´google.gif´, eu mudar para que, quando clicar num button, nesse ´google.gif´ vir a imagem buscada pelo OpenPictureDialog??

Sendo que no botão de buscar a imagem, o código é este:

procedure TForm1.Button2Click(Sender: TObject);
begin
if OpenPictureDialog1.Execute = true then
begin
if OpenPictureDialog1.FileName <> ´´ then
begin
Memo1.Lines.Add(´<br><IMG SRC=´´+ OpenPictureDialog1.FileName + ´´>´);
end;
end;
end;

Desde já agradeço...


Lucas_spohr

Lucas_spohr

Curtidas 0

Respostas

Lucas_spohr

Lucas_spohr

14/09/2007

up!!


GOSTEI 0
POSTAR