Hallo,
hilft Dir das (soeben aus 'nem Programm geklaut):
Delphi-Quellcode:
begin
sl.Clear;
sl.Add('
');
sl.Add(IdMessage.Headers.Text);
sl.Add('
');
sl.Add(idMessage.Body.Text);
sl.Add('
');
For i := 0
To IDMessage.MessageParts.Count - 1
Do Begin
If IdMessage.MessageParts.Items[i]
Is TIDText
Then with IdMessage.MessageParts.Items[i]
As TIDText
do Begin
sl.Add('
');
// ContentType: text/html
If AnsiContainsText(IdMessage.MessageParts.Items[i].ContentType,'
html')
Then Begin
sl.Add(AnsiReplaceText(WrapText(Body.Text, 80),#13#10#13#10,#13#10));
End else Begin
sl.Add(Body.Text);
End;
End;
End;
End;