| View previous topic :: View next topic |
| Author |
Message |
Grega Loboda Guest
|
Posted: Wed Mar 16, 2005 3:02 pm Post subject: Pop3 with ver 8 and 9 |
|
|
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
|
Posted: Wed Mar 16, 2005 6:15 pm Post subject: Re: Pop3 with ver 8 and 9 |
|
|
"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
|
Posted: Thu Mar 17, 2005 7:06 am Post subject: Re: Pop3 with ver 8 and 9 |
|
|
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
|
Posted: Thu Mar 17, 2005 6:56 pm Post subject: Re: Pop3 with ver 8 and 9 |
|
|
"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 |
|
 |
|