Ver Mensaje Individual
  #7  
Antiguo 08-11-2007
Nayla Nayla is offline
Registrado
 
Registrado: nov 2007
Posts: 9
Reputación: 0
Nayla Va por buen camino
Pues no se lo que hago mal pero sigue sin funcionar

Pongo un poco del codigo a ver si alguien me puede iluminar




Código Delphi [-]
 
with IdMessage do begin
ContentType := 'multipart/mixed';
From.Address := 'midireccion';
From.Name := vRemitent
Subject := 'MiAsunto'
Recipients.EMailAddresses := vMail;
Body.Clear;
end;
vNomArxiu := 'nombreImagen.jpg';
slBody := TStringList.Create;
slBody.Assign(ConstruirCosMissatge(pIdClient, pDataPublic, Usuari)); 
 
vIdText := TidText.Create(idMessage.MessageParts, slBody);
vIdText.ContentType := 'text/html';
 
if FileExists(vPathTemp + vNomArxiu) then begin
vIdAttach := TIdAttachment.Create(idMessage.MessageParts, vPathTemp + vNomArxiu);
vIdAttach.ContentType := 'image/jpeg';
vIdAttach.ContentDisposition := 'inline';
vIdAttach.ExtraHeaders.Values['content-id'] := vNomArxiu;
vIdAttach.DisplayName := vNomArxiu;
end;
 
idMessage.Body.Assign(slBody);
 
with idSMTP do begin
Host := 'MiHost';
Port := 25;
HeloName := 'Loquesea';
AuthenticationType := atLogin;
Username := 'MiUsuario';
Password := 'MiPassword';
Connect();
Send(IdMessage);
end;


Gracias de antemano
Responder Con Cita