Re: Cant recieve plain mails

Giganews Newsgroups
Subject: Re: Cant recieve plain mails
Posted by:  Remy Lebeau (TeamB) (no.spam@no.spam.com)
Date: Wed, 11 May 2005

"Niels" <…@mutax.dk> wrote in message news:00E5B46D70CAE240…@mutax.dk...

> I can recieve HTML mails, but when it comes to plain text I cant read
them.

You are not looking at the TIdMessage.MessageParts collection at all.  If
the MessageParts.Count is > 0, the TIdMessage.Body will not contain the text
at all.  It will be stored in TIdText objects inside the MessageParts
instead.

Also, just an FYI, your code is dangerous in general, because you are
accessing GUI components in an unsafe manner.  Indy servers are
multi-threaded, and the VCL, especially visual components, is not
thread-safe.  You need to use the Synchronize() method of TThread/TIdThread
or TIdSync to access the main thread objects in a safe manner.

Gambit

Replies

None

In response to

Cant recieve plain mails posted by Niels on Wed, 11 May 2005