SYNAPSE - Synchronous TCP/IP Library for Delphi
Other related information can be found at http://www.ararat.cz/synapse/
Class: TMIMEMess
- Properties:
- PartList:TList
List of TMimePart objects contains separate parts of message.
- Lines:TStringList
Raw MIME encoded message.
- header:TMessHeader
Record with message headers information. Structure of record is:
TMessHeader=record
from:string;
ToList:tstringlist;
subject:string;
organization:string;
end;
- Methods:
- Procedure clear
Reset component to default state.
- Function AddPart:integer
Add new blank MIME part to PartList and return their index in list.
- Procedure AddPartText(value:tstringList)
Add new MIME part to PartList, set type to text part and set all necessary properties. Value used as text in part.
- Procedure AddPartBinary(value:string)
Add new MIME part to PartList, set type to binary and set all necessary properties. Value used as string with filename contains binary data. MIME primary and secondary types defined automaticly by filename extension.
- Procedure EncodeMessage
Compose message from PartList to Lines. If PartList have more than one part, compose message as multipart. Result in Lines maybe use as text in some new MIME part for compose multilevel MIME messages.
- Procedure FinalizeHeaders
Add headers lines from Header structure to Lines. After this Lines is ready for sending throw SMTP protocol, i.e. by function SentToRaw from SMTPSend.pas.
- Procedure DecodeMessage
Decode message from Lines to PartList. If Lines have more than one part, decompose message to multiple parts.
- Procedure ParseHeaders
Parse headers lines from Lines to Header structure.