# Class TMessHeader

Description | Hierarchy | Fields | Methods | Properties

## Unit

mimemess

## Declaration

`type TMessHeader = class(TObject)`

## Description

Object for basic e-mail header fields.

## Hierarchy

- TObject
- TMessHeader

## Overview

### Methods

| `constructor Create; virtual;`
| `destructor Destroy; override;`
| `procedure Clear; virtual;`
| `procedure EncodeHeaders(const Value: TStrings); virtual;`
| `procedure DecodeHeaders(const Value: TStrings);`
| `function FindHeader(Value: string): string;`
| `procedure FindHeaderList(Value: string; const HeaderList: TStrings);`

### Properties

| `property From: string read FFrom Write FFrom;`
| `property ToList: TStringList read FToList;`
| `property CCList: TStringList read FCCList;`
| `property Subject: string read FSubject Write FSubject;`
| `property Organization: string read FOrganization Write FOrganization;`
| `property CustomHeaders: TStringList read FCustomHeaders;`
| `property Date: TDateTime read FDate Write FDate;`
| `property XMailer: string read FXMailer Write FXMailer;`
| `property ReplyTo: string read FReplyTo Write FReplyTo;`
| `property MessageID: string read FMessageID Write FMessageID;`
| `property Priority: TMessPriority read FPriority Write FPriority;`
| `property CharsetCode: TMimeChar read FCharsetCode Write FCharsetCode;`

## Description

### Methods

| `constructor Create; virtual;`

| `destructor Destroy; override;`

| `procedure Clear; virtual;`

Clears all data fields.

| `procedure EncodeHeaders(const Value: TStrings); virtual;`

| `procedure DecodeHeaders(const Value: TStrings);`

Parse header from Value to this object.

| `function FindHeader(Value: string): string;`

Try find specific header in CustomHeader. Search is case insensitive. This is good for reading any non-parsed header.

| `procedure FindHeaderList(Value: string; const HeaderList: TStrings);`

Try find specific headers in CustomHeader. This metod is for repeatly used headers like 'received' header, etc. Search is case insensitive. This is good for reading ano non-parsed header.

### Properties

| `property From: string read FFrom Write FFrom;`

Sender of message.

| `property ToList: TStringList read FToList;`

Stringlist with receivers of message. (one per line)

| `property CCList: TStringList read FCCList;`

Stringlist with Carbon Copy receivers of message. (one per line)

| `property Subject: string read FSubject Write FSubject;`

Subject of message.

| `property Organization: string read FOrganization Write FOrganization;`

Organization string.

| `property CustomHeaders: TStringList read FCustomHeaders;`

After decoding contains all headers lines witch not have parsed to any other structures in this object. It mean: this conatins all other headers except:

X-MAILER, FROM, SUBJECT, ORGANIZATION, TO, CC, DATE, MIME-VERSION, CONTENT-TYPE, CONTENT-DESCRIPTION, CONTENT-DISPOSITION, CONTENT-ID, CONTENT-TRANSFER-ENCODING, REPLY-TO, MESSAGE-ID, X-MSMAIL-PRIORITY, X-PRIORITY, PRIORITY

When you encode headers, all this lines is added as headers. Be carefull for duplicites!

| `property Date: TDateTime read FDate Write FDate;`

Date and time of message.

| `property XMailer: string read FXMailer Write FXMailer;`

Mailer identification.

| `property ReplyTo: string read FReplyTo Write FReplyTo;`

Address for replies

| `property MessageID: string read FMessageID Write FMessageID;`

message indetifier

| `property Priority: TMessPriority read FPriority Write FPriority;`

message priority

| `property CharsetCode: TMimeChar read FCharsetCode Write FCharsetCode;`

Specify base charset. By default is used system charset.

Generated by PasDoc 0.9.0 on 2012-04-23 21:38:51