Пытаясь оценить содержимое почтового сообщения, я #m использую этот код, полученный из СООТВЕТСТВУЮЩИЙ ВОПРОС ПО ЭЛЕКТРОННОЙ ПОЧТЕ С INDY
DisplayMultiPartMixed(aMsg: TIdMessage; aParentIndex, aLastIndex: Integer);
var
Part: TIdMessagePart;
i: Integer;
begin
for i := aLastIndex-1 downto aParentIndex+1 do
begin
Part := aMsg.MessageParts.Items[i];
if (Part.ParentPart = aParentIndex) and (Part is TIdText) then
begin
if IsHeaderMediaType(Part.ContentType, 'multipart/alternative') then
begin
DisplayMultiPartAlternative(aMsg, Part.Index, aLastIndex);
Exit;
end;
if IsHeaderMediaType(Part.ContentType, 'text/html') then
begin
DisplayHTML(Part.Body);
Exit;
end;
if IsHeaderMediaType(Part.ContentType, 'text/plain') then
begin
DisplayPlainText(Part.Body);
Exit;
end;
aLastIndex := i;
end;
// nothing supported to display...
end;
end;
Я не смог найти свойство body (TStrings) внутри подкласса INDY 10 TidMessage , Part