Class TMimeMess

DescriptionHierarchyFieldsMethodsProperties

Unit

mimemess

Declaration

type TMimeMess = class(TObject)

Description

Object for handling of e-mail message.

Hierarchy

TMimeMess > TObject

Methods

Overview

Public constructor Create;
Public constructor CreateAltHeaders(HeadClass: TMessHeaderClass);
Public destructor Destroy; override;
Public function AddPart(const PartParent: TMimePart): TMimePart;
Public function AddPartBinary(const Stream: TStream; const FileName: string; const PartParent: TMimePart): TMimepart;
Public function AddPartBinaryFromFile(const FileName: string; const PartParent: TMimePart): TMimepart;
Public function AddPartHTML(const Value: TStrings; const PartParent: TMimePart): TMimepart;
Public function AddPartHTMLBinary(const Stream: TStream; const FileName, Cid: string; const PartParent: TMimePart): TMimepart;
Public function AddPartHTMLBinaryFromFile(const FileName, Cid: string; const PartParent: TMimePart): TMimepart;
Public function AddPartHTMLFromFile(const FileName: String; const PartParent: TMimePart): TMimepart;
Public function AddPartMess(const Value: TStrings; const PartParent: TMimePart): TMimepart;
Public function AddPartMessFromFile(const FileName: string; const PartParent: TMimePart): TMimepart;
Public function AddPartMultipart(const MultipartType: String; const PartParent: TMimePart): TMimePart;
Public function AddPartText(const Value: TStrings; const PartParent: TMimePart): TMimepart;
Public function AddPartTextFromFile(const FileName: String; const PartParent: TMimePart): TMimepart;
Public procedure Clear;
Public procedure DecodeMessage;
Public procedure EncodeMessage;

Description

Public function AddPart(const PartParent: TMimePart): TMimePart;

Add MIME part as subpart of PartParent. If you need set root MIME part, then set as PartParent nil value. If you need set more then one subpart, you must have PartParent of multipart type!

Public function AddPartBinary(const Stream: TStream; const FileName: string; const PartParent: TMimePart): TMimepart;

Add MIME part as subpart of PartParent. If you need set root MIME part, then set as PartParent nil value. If you need set more then 1 subpart, you must have PartParent of multipart type!

After creation of part set type to binary and set all necessary properties. MIME primary and secondary types defined automaticly by filename extension. Content of binary part is readed from Stream. This binary part is encoded as file attachment.

Public function AddPartBinaryFromFile(const FileName: string; const PartParent: TMimePart): TMimepart;

Same as AddPartBinary, but content is readed from file

Public function AddPartHTML(const Value: TStrings; const PartParent: TMimePart): TMimepart;

Add MIME part as subpart of PartParent. If you need set root MIME part, then set as PartParent nil value. If you need set more then 1 subpart, you must have PartParent of multipart type!

After creation of part set type to text part to HTML type and set all necessary properties. Content of HTML part is readed from Value stringlist.

Public function AddPartHTMLBinary(const Stream: TStream; const FileName, Cid: string; const PartParent: TMimePart): TMimepart;

Add MIME part as subpart of PartParent. If you need set root MIME part, then set as PartParent nil value. If you need set more then 1 subpart, you must have PartParent of multipart type!

After creation of part set type to binary and set all necessary properties. MIME primary and secondary types defined automaticly by filename extension. Content of binary part is readed from Stream.

This binary part is encoded as inline data with given Conten ID (cid). Content ID can be used as reference ID in HTML source in HTML part.

Public function AddPartHTMLBinaryFromFile(const FileName, Cid: string; const PartParent: TMimePart): TMimepart;

Same as AddPartHTMLBinary, but content is readed from file

Public function AddPartHTMLFromFile(const FileName: String; const PartParent: TMimePart): TMimepart;

Same as AddPartHTML, but content is readed from file

Public function AddPartMess(const Value: TStrings; const PartParent: TMimePart): TMimepart;

Add MIME part as subpart of PartParent. If you need set root MIME part, then set as PartParent nil value. If you need set more then 1 subpart, you must have PartParent of multipart type!

After creation of part set type to message and set all necessary properties. MIME primary and secondary types are setted to 'message/rfc822'. Content of raw RFC-822 message is readed from Stream.

Public function AddPartMessFromFile(const FileName: string; const PartParent: TMimePart): TMimepart;

Same as AddPartMess, but content is readed from file

Public function AddPartMultipart(const MultipartType: String; const PartParent: TMimePart): TMimePart;

Add MIME part as subpart of PartParent. If you need set root MIME part, then set as PartParent nil value. If you need set more then 1 subpart, you must have PartParent of multipart type!

This part is marked as multipart with secondary MIME type specified by MultipartType parameter. (typical value is 'mixed')

This part can be used as PartParent for another parts (include next multipart). If you need only one part, then you not need Multipart part.

Public function AddPartText(const Value: TStrings; const PartParent: TMimePart): TMimepart;

Add MIME part as subpart of PartParent. If you need set root MIME part, then set as PartParent nil value. If you need set more then 1 subpart, you must have PartParent of multipart type!

After creation of part set type to text part and set all necessary properties. Content of part is readed from value stringlist.

Public function AddPartTextFromFile(const FileName: String; const PartParent: TMimePart): TMimepart;

Same as AddPartText, but content is readed from file

Public procedure Clear;

Reset component to default state.

Public constructor Create;

 

Public constructor CreateAltHeaders(HeadClass: TMessHeaderClass);

create this object and assign your own descendant of TMessHeader object to Header property. So, you can create your own message headers parser and use it by this object.

Public procedure DecodeMessage;

Decode message from Lines to MessagePart. Massage headers are parsed into Header object.

Public destructor Destroy; override;

 

Public procedure EncodeMessage;

Compose message from MessagePart to Lines. Headers from Header object is added also.

Properties

Overview

Published property Header: TMessHeader;
Published property Lines: TStringList;
Published property MessagePart: TMimePart;

Description

Published property Header: TMessHeader;

Object for e-mail header fields. This object is created automaticly. Do not free this object!

Published property Lines: TStringList;

Raw MIME encoded message.

Published property MessagePart: TMimePart;

TMimePart object with decoded MIME message. This object can handle any number of nested TMimePart objects itself. It is used for handle any tree of MIME subparts.


Generated by PasDoc 0.8.8.2 on 2005-01-19 20:01:18