|Subject:||Indy 10 - TIdMessageClient.ReceiveBody procedure VS. IsMsgSinglePartMime propert|
|Posted by:||Vincent Lemieux (vincentlemie…@yahoo.com)|
|Date:||Wed, 22 Dec 2004|
I always load IdMessages using LoadFromStream.
What I found is that if I load a message with only one part, it will load
fine and the IsMsgSinglePartMime property will be set to TRUE by the
Now, I go to another message and tries to load it. This new message has
multiple parts. (text/plain | text/html)
The message will not load correctly. Every parts will have the content-type
of the message. (Probably multipart/alternative)
It does that because the TIdMessageClient.ReceiveBody procedure works this
way when IsMsgSinglePartMime is TRUE.
The fact is that the property is still TRUE because of a previous message,
which does not apply to the message I'm currently loading.
Clear was called but IsMsgSinglePartMime is never reseted to FALSE.
What I did is the following :
In IdMessage.pas, I added the following line at the end of the
This way, every time I load a new message, I begin the work with the
IsMsgSinglePartMime property to FALSE.
Seems fine to me but I would like to know any "better" solution if there is