How to handle mime message on vcl
MIME encoded emails do not use the property TIdMessage.Body
. Instead, they use a property TIdMessage.MessageParts
where MIME text parts are stored as objects TIdText
and attachments are stored as TIdAttachment
-derived objects . You should look at the property TIdMessage.ContentType
to see if you are working with HTML email or MIME email. Even then, the chances are that HTML email messages are actually MIME encoded as they usually include an alternative plain text MIME part for non-HTML email readers. You can loop TIdMessage.MessageParts
to find the object TIdText
that ContentType
is HTML and then copy the content TIdText.Body
to your TMemo.
source to share