Ver Mensaje Individual
  #5  
Antiguo 19-11-2003
Descendents Descendents is offline
Miembro
 
Registrado: may 2003
Ubicación: Barcelona
Posts: 396
Reputación: 22
Descendents Va por buen camino
Ya lo he conseguido lo pongo aqui lo que me ha ayudado por si alguien le sirve


Código Delphi [-]
var
  idAttach: TidAttachment;
  idText1: TidText;
  idText2: TidText;
  p: TidMessageParts;
  slBody: TStringList;
begin
  idMessage1.Recipients.Add;
  idMessage1.Recipients[0].Address := 'girlswants_me@yahoo.com';
  p := idMessage1.MessageParts;
  slBody := TstringList.Create;
  try
    // you can actually load the body from a RichEdit with 
    // slBody.Text := RichEdit1.LinesText;
    slBody.Add('');
    slBody.Add('');
    slBody.Add('');
    slBody.Add('');
    slBody.Add('

Here is the image:


'
); slBody.Add(''); slBody.Add(''); slBody.Add(''); idText1 := TidText.Create(p, slBody); idText1.ContentType := 'text/html'; idText2 := TidText.Create(p); idText2.ContentType := 'text/plain'; idText2.Body.Text := ''; // This shows how to add an attachment idAttach := TidAttachment.Create(p, 'c:\sm101yellow.jpg'); idAttach.ContentType := 'image/jpeg'; idAttach.ContentDisposition := 'inline'; idAttach.ExtraHeaders.Values['content-id'] := 'sm101yellow.jpg'; idMessage1.Body.Assign(slBody); idAttach.DisplayName := 'sm101yellow.jpg'; idMessage1.ContentType := 'multipart/mixed'; idSMTP1.Connect; idSMTP1.Send(idMessage1); finally idSMTP1.Disconnect; slBody.Free; Showmessage('done'); end; end;

//Lo modifique para colocar las etiquetas Delphi

Un saludo
Gracias

Última edición por jhonny fecha: 05-03-2007 a las 21:39:07.
Responder Con Cita