Class Rfc822Header

Description

MIME header class input: header_string or array You must call parseHeader() function after creating object in order to fill object's parameters.

  • since: 1.3.0
  • todo: FIXME: there is no constructor function and class should ignore all input args.

Located in /class/mime/Rfc822Header.class.php (line 26)


	
			
Variable Summary
array $bcc
array $cc
mixed $content_id
object $content_type
mixed $date
mixed $disposition
mixed $dnt
mixed $drnt
mixed $encoding
array $from
string $in_reply_to
string $message_id
mixed $mime
mixed $mlist
integer $priority
string $references
array $reply_to
mixed $sender
string $subject
array $to
string $xmailer
Method Summary
object AddressStructure createAddressObject ( &$aStack,  &$aComment,  &$sEmail, [string $sGroup = ''], array $aStack, array $aComment, string $sEmail)
mixed findAddress (mixed $address, [boolean $recurs = false])
array getAddressTokens (string $address)
array getAddr_a (mixed $arg, [array $excl_arr = array()], [array $arr = array()])
string getAddr_s (mixed $arr, [string $separator = ','], [boolean $encoded = false])
array getContentType (string $type0, string $type1)
void mlist (string $field, string $value)
mixed parseAddress (string $address, [boolean $ar = false], [ $aAddress = array()], [ $sGroup = ''], [ $sHost = ''], [string $lookup = false], array $addr_ar, string $group, string $host)
void parseContentType (string $value)
void parseDisposition (string $value)
void parseField (string $field, string $value)
void parseHeader (mixed $hdr)
integer parsePriority (string $sValue)
array parseProperties (string $value)
array processParameters (array $aParameters)
string stripComments (string $value)
Variables
array $bcc = array() (line 70)

Bcc header

array $cc = array() (line 65)

Cc header

mixed $content_desc = '' (line 130)
mixed $content_id = '' (line 126)
object $content_type = '' (line 94)

Content Type object

mixed $date = -1 (line 31)

Date header

mixed $disposition = '' (line 98)
mixed $dnt = '' (line 113)

Disposition notification for requesting message delivery notification (MDN)

mixed $drnt = '' (line 118)

Delivery notification (DR)

mixed $encoding = '' (line 122)
array $from = array() (line 41)

From header

string $in_reply_to = '' (line 75)

In-reply-to header

array $mail_followup_to = array() (line 55)

Mail-Followup-To header

string $message_id = '' (line 80)

Message-ID header

mixed $mime = false (line 89)
mixed $mlist = array() (line 134)
array $more_headers = array() (line 140)

Extra header

only needed for constructing headers in delivery class

integer $priority = 3 (line 108)

Priority header

string $references = '' (line 85)

References header

array $reply_to = array() (line 50)

Reply-To header

mixed $sender = '' (line 45)
string $subject = '' (line 36)

Subject header

array $to = array() (line 60)

To header

string $xmailer = '' (line 103)

X-Mailer header

Methods
createAddressObject (line 482)
  • return: object
object AddressStructure createAddressObject ( &$aStack,  &$aComment,  &$sEmail, [string $sGroup = ''], array $aStack, array $aComment, string $sEmail)
  • array $aStack
  • array $aComment
  • string $sEmail
  • string $sGroup
  • &$aStack
  • &$aComment
  • &$sEmail
findAddress (line 881)
  • return: array, boolean
  • since: 1.3.2
mixed findAddress (mixed $address, [boolean $recurs = false])
  • mixed $address: array or string
  • boolean $recurs
getAddressTokens (line 350)
array getAddressTokens (string $address)
  • string $address
getAddr_a (line 840)

function to get the array of addresses out of the header.

array getAddr_a (mixed $arg, [array $excl_arr = array()], [array $arr = array()])
  • mixed $arg: string or array of strings
  • array $excl_arr: array of excluded email addresses
  • array $arr: array of added email addresses
getAddr_s (line 797)

function to get the address strings out of the header.

example1: header->getAddr_s('to'). example2: header->getAddr_s(array('to', 'cc', 'bcc'))

string getAddr_s (mixed $arr, [string $separator = ','], [boolean $encoded = false])
  • mixed $arr: string or array of strings
  • string $separator
  • boolean $encoded: (since 1.4.0) return encoded or plain text addresses
getContentType (line 946)
  • return: media properties
  • todo: check use of media type arguments
array getContentType (string $type0, string $type1)
  • string $type0: media type
  • string $type1: media subtype
mlist (line 771)

Fills mlist array keys in rfc822Header object

void mlist (string $field, string $value)
  • string $field
  • string $value
parseAddress (line 535)

recursive function for parsing address strings and storing them in an address stucture object.

personal name: encoded: =?charset?Q|B?string?= quoted: "string" normal: string email : <mailbox@host> : mailbox@host This function is also used for validating addresses returned from compose That's also the reason that the function became a little bit huge

  • return: array with AddressStructure objects or only one address_structure object.
mixed parseAddress (string $address, [boolean $ar = false], [ $aAddress = array()], [ $sGroup = ''], [ $sHost = ''], [string $lookup = false], array $addr_ar, string $group, string $host)
  • string $address
  • boolean $ar: return array instead of only the first element
  • array $addr_ar: (obsolete) array with parsed addresses
  • string $group: (obsolete)
  • string $host: default domainname in case of addresses without a domainname
  • string $lookup: (since) callback function for lookup of address strings which are probably nicks (without @)
  • $aAddress
  • $sGroup
  • $sHost
parseContentType (line 663)
void parseContentType (string $value)
  • string $value: content type header
parseDisposition (line 751)

Fills disposition object in rfc822Header object

void parseDisposition (string $value)
  • string $value
parseField (line 224)

Parse header field according to field type

void parseField (string $field, string $value)
  • string $field: field name
  • string $value: field value
parseHeader (line 145)
void parseHeader (mixed $hdr)
  • mixed $hdr: string or array with message headers
parsePriority (line 643)

Normalise the different Priority headers into a uniform value, namely that of the X-Priority header (1, 3, 5). Supports: Priority, X-Priority, Importance.

X-MS-Mail-Priority is not parsed because it always coincides with one of the other headers.

NOTE: this is actually a duplicate from the function in functions/imap_messages. I'm not sure if it's ok here to call that function?

integer parsePriority (string $sValue)
  • string $sValue: literal priority name
parseProperties (line 729)
array parseProperties (string $value)
  • string $value
processParameters (line 688)

RFC2184

array processParameters (array $aParameters)
  • array $aParameters
stripComments (line 175)
string stripComments (string $value)
  • string $value

Documentation generated on Sat, 07 Oct 2006 16:13:21 +0300 by phpDocumentor 1.3.0RC6