# Header Field classes

classes which represent mail header.

## HeaderField

### Super Class

Object

### Class Methods

new( fname: String, fbody: String ) : HeaderField
  create new HeaderField object. fname is the name of field, fbody is the body string of field. All sub classes of HeaderField can be created by this method.

### Methods

name : duplicated String
  name of this field. read only.
to_s( sep = "\n " ): String
  returns encoded header field. When length of string is too long, use 'sep' string as separator.
inspect : String
  returns decoded header field.
body : String
  returns decoded field body.

## StringH

### Super Class

HeaderField

### headers using this class

- Subject:
- Comments:
- Content-Description

### Methods

body, body=( bodi: String )
  raw field body string

## StructH

This is an abstract class which stands all "struct" header.

### Super Class

HeaderField

### Methods

comments
  return Array of "comment".

  ## UnknownH

  ### Super Class

  StructH

  ### headers using this class

  All headers which TMail can't know a way to parse.

  ### Methods

  body, body=( bodi: String )
    field body (not parsed raw string)

  ## DateH

  ### Super Class

  StructH

  ### headers using this class

  - Date:
  - Resent-Date:

  ### ClassMethods

  DateH.t2s( time: Time ) : String
    converts 'time' to RFC822 formatted string (MON DD YYYY HH:MM:SS [+/-]ZZZZ ).

  ### Methods

  date, date=( dat : Time )
    Time object which represents the header's date and time. This object is preserved as local-time.

  ## SaddrH

  ### Super Class

  StructH

  ### headers using this class

  - Return-Path:
  - Sender:
  - Resent-Sender:

  ### Methods

  addr, addr=( adr : MailAddr )
    A Mbox or an AddrGroup.

  ## MaddrH

  ### Super Class

  StructH

  ### headers using this class

  - To:
  - Cc:
  - Bcc:
  - From:
  - Reply-To:
  - Resent-To:
  - Resent-Cc:
  - Resent-Bcc:
  - Resent-From:
  - Resent-Reply-To:

  ### Methods

  addrs : Array of MailAddr
    returns an array, of Mbox or AddrGroup.

  ## MsgidH

  ### Super Class

  StructH

  ### headers using this class

  - Message-ID:
  - Resent-Message-ID:
  - Content-ID:

  ### Class Methods

  MsgidH.msgid?( str : String )
    If 'str' include Message-ID, return it. Else, return nil.

  ### Methods

  msgid, msgid=( str : String )
    message-ID.

  ## RefH

  ### Super Class

  StructH

  ### headers using this class

  - References:
  - In-Reply-To:

  ### Methods

  refs : Array of String
    returns an array of (Message-IDs and phrases).
  each_msgid{|msgid| .... }
    iteration for each message ID.
  each_phrase{|phrase| .... }
    iteration for each phrase.

  ## RecvH

  ### Super Class

  StructH

  ### headers using this class

  - Received:

  ### Methods

  from, from=( domain: String )
    "from" string. This string must be domain formatted.
  by, by=( domain: String )
    "by" string. This string must be domain formatted.
  via, via=( atom: String )
    "via" string.
  with : Array of String
    an array of "with" string.
  msgid, msgid=( mid : String )
    message ID. 'mid' must be Message-ID formatted.
  ford, ford=( fod : Mbox )
    string which stands "for" domain. This method is NOT 'for' because of 'for' is a reserved word. 'd' is initial char of "domain".
  date, date=( dat : Time )
    Time object which is written after ';' in header. 'dat' will be converted to local time.

  ## EncH

  ### Super Class

  StructH

  ### header using this class

  - Encrypted:

  ### Methods

  encrypter, encrypter=( enc: String )
    encrypter
  keyword, keyword=( key: String )
    keyword

  ## VersionH

  ### Super Class

  StructH

  ### header using this class

  - MIME-Version:

  ### Methods

  major, major=( maj: Integer )
    major version.
  minor, minor=( min: Integer )
    minor version.

  ## CTypeH

  ### Super Class

  StructH

  ### headers using this class

  - Content-Type:

  ### Methods

  main, main=( tipe: String )
    content main type.
  sub, sub=( tipe: String )
    content sub type.
  params : Hash
    parameters.

  ## CEncodingH

  ### Super Class

  StructH

  ### headers using this class

  - Content-Transfer-Encoding:

  ### Methods

  encoding, encoding=( enc: String )
    content transfer encoding. Ordinary '7bit' '8bit' 'Base64' or else.

  ## CDisposition

  ### Super Class

  StructH

  ### Headers which use this class

  - Content-Disposition

  ### Methods

  disposition, disposition=( dis: String )
    content disposition
  params : Hash
    parameters.

  ## Association between a Field name and class

  Field Name | Class
  --- | ---
  Date | DateH
  Resent-Date | DateH
  Received | RecvH
  Return-Path | SaddrH
  Sender | SaddrH
  Resent-Sender | SaddrH
  To | MaddrH
  Cc | MaddrH
  Bcc | MaddrH
  From | MaddrH
  Reply-To | MaddrH
  Resent-To | MaddrH
  Resent-Cc | MaddrH
  Resent-Bcc | MaddrH
  Resent-From | MaddrH
  Resent-Reply-To | MaddrH
  Message-ID | MsgidH
  Resent-Message-ID | MsgidH
  In-Reply-To | RefH
  References | RefH
  Keywords | KeyH
  Encrypted | EncH
  Subject | StringH
  Comments | StringH
  MIME-Version | VersionH
  Content-Type | CTypeH
  Content-Transfer-Encoding | CEncodingH
  Content-ID | MsgidH
  Content-Description | StringH

  Copyright (c) 1999,2000 Minero Aoki <aamine@dp.u-netsurf.ne.jp>