0

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

1 Answer 1

0

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).

3
  • is Indy support openpgp ?
    – 陈发条
    Apr 4 at 6:00
  • Not directly, no. But you should be able to extract the raw encrypted data/signature/keys to use in any OpenPGP library you want. Apr 4 at 6:22
  • ok...i use cis instead it just support
    – 陈发条
    Apr 4 at 15:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.