SYNAPSE - Synchronous TCP/IP Library for Delphi
Other related information can be found at http://www.ararat.cz/synapse/
Class: TMIMEPart
- Properties:
- Primary:string
Primary Mime type of part. (i.e. 'application') Write to this property automaticly generate value of PrimaryCode.
- PrimaryCode:TMimePrimary
Decoded primary type. Possible values are: MP_TEXT, MP_MULTIPART, MP_MESSAGE and MP_BINARY. If type not recognised, result is MP_BINARY.
- secondary:string
Secondary Mime type of part. (i.e. 'mixed')
- encoding:string
String representation of used Mime encoding in part. (i.e. 'base64') Write to this property automaticly generate value of EncodingCode.
- EncodingCode:TMimeEncoding
Decoded encoding type. Possible values are: ME_7BIT, ME_8BIT, ME_QUOTED_PRINTABLE and ME_BASE64. If type not recognised, result is ME_7BIT.
- charset:string
String representation of used Mime charset in part. (i.e. 'iso-8859-1') Write to this property automaticly generate value of CharsetCode. This used only for text part.
- CharsetCode:TMimeChar
Decoded charset type. Possible values are defined in MimeChar.pas.
- TargetCharset:TMimeChar
System charset type. Default value is charset used by default in your windows.
- description:string
Decsription of Mime part.
- boundary:string
Boundary delimiter of multipart Mime part. Used only in multipart part.
- FileName:string
Filename of file in binary part.
- Lines:TStringList
String list with lines contains mime part.
- DecodedLines:TmemoryStream
Stream with decoded form of mime part.
- Methods:
- Procedure clear
Reset component to default state.
- Function ExtractPart(value:TStringList; BeginLine:integer):integer
Extract part to this component from message in value from line no. BeginLine. End part is returned as result.
- Procedure DecodePart
decode mime part from lines to DecodedLines.
- Procedure EncodePart
Encode mime part from DecodedLines to Lines and buld mime headers.
- Procedure MimeTypeFromExt(value:string)
generate primary and secondary mime type from filename extension in value.
- Misc. functions:
- Procedure NormalizePart(value:Tstringlist)
normalize headers message in value from multi-line headers to single lines headers.
- Function InlineDecode(value:string;CP:TMimeChar):string
decode mime inline coding (i.e. in headers) used target charset CP.
- Function InlineEncode(value:string;CP,MimeP:TMimeChar):string
Encode string to mime inline coding. Source charset is CP, target charset is MimeP.
- Function NeedInline(value:string):boolean
Return true, if value contains character need to inline coding.
- Function InlineCode(value:string):string
Inline mime encode. Similar to InlineEncode, but source charset is automaticly set to system default charset, and target charset is automaticly set to one of ISO-8859 coding.
- Function InlineEmail(value:string):string
Convert e-mail address to canonical mime form '"someone"<people@somewhere.com>'.
- Function GenerateBoundary:string
Generate unique boundary string.