content type is Content-Type: multipart/mixed; boundary="nm_5da15248d437196b097ad4ae2ba7"
how can i do with Inmessage to Get Text?
the correct way to check mail content
multipart/...
content is stored in separate TIdText
and TIdAttachment
objects in the TIdMessage.MessageParts
property, it is not stored in the TIdMessage.Body
property (unless TIdMessage.NoDecode=True
, that is).
You will have to enumerate the TIdMessage.MessageParts
looking for a TIdMessagePart
object whose ContentType
represents the data you want to process, and then you can type-cast that object to either TIdText
or TIdAttachment
based on whether its PartType
is mptText
or mptAttachment
, and then you can handle that object's data as needed (ie, using the TIdText.Body
property, or the TIdAttachment.OpenLoadStream()
or TIdAttachment.SaveTo...()
method).