Ver Mensaje Individual
  #2  
Antiguo 30-03-2007
Val Val is offline
Miembro
 
Registrado: feb 2007
Posts: 51
Reputación: 20
Val Va por buen camino
He probado el código que he encontrado en http://www.dragonsoftru.com/articles....html#part_3_4 :

Código:
var
  lMessage: TIdMessage;
  lTextPart: TIdText;
  lImagePart: TIdAttachment;
begin
  // ... some code here to initialize your SMTP server.
  // It could be done somewhere as well
  lMessage := TIdMessage.Create(Self);
  lMessage.From.Address := '[email protected]';
  lMessage.Subject := 'My test email';
  lMessage.Recipients.Add.Address := '[email protected]';
  lMessage.Body.Clear;
  lTextPart := TIdText.Create(lMessage.MessageParts);
  lTextPart.Body.Text := 'This is a plain text message';
  lTextPart.ContentType := 'text/plain';
  lTextPart := TIdText.Create(lMessage.MessageParts);
  lTextPart.Body.Text := '<html><body><b>This is a HTML message with picture</b><img src="htmlbodyIMG0000.JPG" ></body></html>';
  lTextPart.ContentType := 'text/html';
  lImagePart := TIdAttachment.Create(lMessage.MessageParts, 'htmlbodyIMG0000.JPG');
  lImagePart.ContentType := 'image/jpg';
  lImagePart.Headers.Add('Content-ID: <htmlbodyIMG0000.JPG>');
  // ... A code to send a message
end;
Pero aunque tengo el archivo como adjunto en el outlook me aparece el tipico cuadradito con una X de que no se encuentra la imagen (he quitado el bloqueo de imagenes...). ¿Alguien sabe a que puede deberse?

Gracias
Responder Con Cita