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 

Pop3 with ver 8 and 9

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





PostPosted: Wed Mar 16, 2005 3:02 pm    Post subject: Pop3 with ver 8 and 9 Reply with quote



Another strange behaviour. Code:

POP.Retrieve(i, Msg);

for intIndex := 0 to Pred(Msg.MessageParts.Count) do
if Msg.MessageParts.Items[intIndex] is TIdText then
sl.Text := TIdText(Msg.MessageParts.Items[intIndex]).Body.Text;

Msg.MessageParts.Count is more than 0 with version 8, it's 0 with version 9?
Is this possible?


Back to top
Remy Lebeau (TeamB)
Guest





PostPosted: Wed Mar 16, 2005 6:15 pm    Post subject: Re: Pop3 with ver 8 and 9 Reply with quote




"Grega Loboda" <grega.loboda (AT) email (DOT) si> wrote


Quote:
Msg.MessageParts.Count is more than 0 with version 8,
it's 0 with version 9? Is this possible?

Of course it is possible. Indy 9 has more parsing then Indy 8 does. If the
text is not placed in a TIdText then it is placed in the TIdMessage.Body
instead, which you are not checking.


Gambit



Back to top
Grega Loboda
Guest





PostPosted: Thu Mar 17, 2005 7:06 am    Post subject: Re: Pop3 with ver 8 and 9 Reply with quote



That's it. But how do I know where is it? Do I have to check both things or
there are some rules.

"Remy Lebeau (TeamB)" <no.spam (AT) no (DOT) spam.com> wrote

Quote:

"Grega Loboda" <grega.loboda (AT) email (DOT) si> wrote in message
news:42384a60 (AT) newsgroups (DOT) borland.com...

Msg.MessageParts.Count is more than 0 with version 8,
it's 0 with version 9? Is this possible?

Of course it is possible. Indy 9 has more parsing then Indy 8 does. If
the
text is not placed in a TIdText then it is placed in the TIdMessage.Body
instead, which you are not checking.


Gambit





Back to top
Remy Lebeau (TeamB)
Guest





PostPosted: Thu Mar 17, 2005 6:56 pm    Post subject: Re: Pop3 with ver 8 and 9 Reply with quote


"Grega Loboda" <grega.loboda (AT) email (DOT) si> wrote


Quote:
That's it. But how do I know where is it? Do I have to check both things

Yes. Look at the MessageParts first. If there are any TIdText instances,
use them. If there are no TIdText instances, then use the main Body
instead.


Gambit



Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Internet Winsock 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.