 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Andrea Guest
|
Posted: Mon Jan 12, 2004 9:44 am Post subject: Decoding message parts with indy |
|
|
Hello!
I am trying to get a message from a pop3 server and display it to the user.
I have problems showing the body of certain messages, I think when they are
in mime multipart.
Here is the code I use:
procedure TForm1.scarica_messaggio_selezionatoExecute(Sender: TObject);
var i:integer;
begin
richedit1.clear;
msg.clear; //msg:tidmessage
//retrieve the message selected in a listview
pop3.Retrieve(msglist.itemindex+1,msg);
//if there is no body process messageparts
if msg.Body.text='' then
begin
for i:=0 to msg.MessageParts.Count-1 do
begin
if msg.MessageParts.Items[i] is tidtext then
richedit1.lines.addstrings(tidtext(msg.MessageParts.Items[i]).body);
end;
end
else
richedit1.Lines:=msg.Body;
end;
With this code, certain messages are downloaded and I see only
this message is in multipart mime format (or something similar).
Thanks for your help
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|