BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Decoding message parts with indy

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Internet
View previous topic :: View next topic  
Author Message
Andrea
Guest





PostPosted: Sun Jan 11, 2004 2:34 am    Post subject: Decoding message parts with indy Reply with quote



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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Internet All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.