Topic Path: Symbol Reference > Structs, Records, Enums > TIdMessageCoderPartType Enumeration
ContentsIndexHome
PreviousUpNext
TIdMessageCoderPartType Enumeration

Specifies the type of RFC message part handled by an Indy message decoder.

File
TIdMessageCoderPartType = (
  mcptUnknown,
  mcptText,
  mcptAttachment
);

TIdMessageCoderPartType is an enumerated type that specifies the type of RFC message part handled by an Indy message decoder. 

TIdMessageCoderPartType may contain one of the following values: 

 

Value 
Meaning 
ptUnknown 
the type of Message Part is unknown. 
ptText 
indicates a TIdText Message Part. 
ptAttachment 
indicates a TIdAttachment Message Part. 
ptUnknown 
indicates the message part type could not be determined. 

 

Indy classes, like TIdMessageClient, will raise an EIdException exception with the constant RSMsgClientUnkownMessagePartType error message when an unknown message part is encountered. 

ptText indicates that the RFC-2822 message headers for a message part have been examined, and the message body contains textual content. 

ptAttachment indicates that the RFC-2822 message headers for a message part have been examined, and the message body contains an attachment. 

TIdMessageDecoder is used to access a message to determine the TIdMessageCoderPartType value used for a message part by using the TIdMessageDecoder.ReadHeader method. Based on the value of TIdMessageCoderPartType, the appropriate TIdText or TIdAttachment instance is created to receive the message part headers and contents. 

Copyright 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.