Ver Mensaje Individual
  #13  
Antiguo 08-11-2007
Avatar de gluglu
[gluglu] gluglu is offline
Miembro Premium
 
Registrado: sep 2004
Ubicación: Málaga - España
Posts: 1.455
Reputación: 21
gluglu Va por buen camino
He revisado mi código :

Código Delphi [-]
IdMessage1.ContentType := 'multipart/related; type="text/html"';
 
...
 
// Just HTML Text, No Attachments, No Embedded Images
MessageType := 1;
IdMessage1.ContentType := 'multipart/alternative';
...
// HTML Text + Attachments, No Embedded Images
MessageType := 2;
IdMessage1.ContentType := 'multipart/mixed';
...
// HTML Text + Attachments + Embedded Images
MessageType := 3;
IdMessage1.ContentType := 'multipart/mixed';
with TIdText.Create(IdMessage1.MessageParts, nil) do begin
  ContentType := 'multipart/related; type="multipart/alternative"';
end;
with TIdText.Create(IdMessage1.MessageParts, nil) do begin
  ContentType := 'multipart/alternative';
  ParentPart := 0;
end;
...
// HTML Text + Embedded Images, No Attachments
MessageType := 4;
IdMessage1.ContentType := 'multipart/related; type="text/html"';

// MessageType
// 1 = Only Text HTML
// 2 = Text + File Attachments
// 3 = Text + File Attachments + Embedded Images
// 4 = Text + Embedded Images
 
with TIdText.Create(IdMessage1.MessageParts, nil) do begin
  Body.Assign(html);
  ContentType := 'text/html';
  if MessageType = 3 then ParentPart := 1;
  CharSet     := 'iso-8859-1';
end;
 
with TIdAttachmentFile.Create(IdMessage1.MessageParts, 'C:\AT0001.JPG') do begin
  ContentID   := '0001';
  ContentType := 'image/jpeg';
  FileName    := 'AT0001.JPG';
  if MessageType = 3 then ParentPart := 0;
end;

with TIdAttachmentFile.Create(IdMessage1.MessageParts, 'C:\AT0002.JPG') do begin
  ContentID   := '0002';
  ContentType := 'image/jpeg';
  FileName    := 'AT0002.JPG';
  if MessageType = 3 then ParentPart := 0;
end;

A ver si con estas líneas de código ya te funciona.
__________________
Piensa siempre en positivo !
Responder Con Cita