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.

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

Located in /nasmail/class/mime/Rfc822Header.class.php (line 31)


	
			
Direct descendents
Class Description
 class openpgp_header Adds OpenPGP header parsing to Rfc822Header class
Variable Summary
Method Summary
 object AddressStructure createAddressObject ( &$aStack,  &$aComment,  &$sEmail, [string $sGroup = ''], array $aStack, array $aComment, string $sEmail)
 mixed findAddress (array|string $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 parseSpamStatus (string $value)
 array processParameters (array $aParameters)
 string stripComments (string $value)
Variables
array $bcc = array() (line 82)

Bcc header

array $cc = array() (line 77)

Cc header

mixed $content_type = '' (line 105)
integer $date = -1 (line 36)

Timestamp of date header

string $date_unparsed = '' (line 42)

Original date header as fallback for unparsable dates

  • since: 1.1 (sm 1.4.10)
mixed $disposition = '' (line 109)
mixed $dnt = '' (line 123)
mixed $encoding = '' (line 127)
array|object AddressStructure $from = array() (line 53)

From header

string $in_reply_to = '' (line 87)

In-reply-to header

array $mail_followup_to = array() (line 67)

Mail-Followup-To header

string $message_id = '' (line 92)

Message-ID header

mixed $mime = false (line 101)
mixed $mlist = array() (line 131)
array $more_headers = array() (line 142)

Extra header

only needed for constructing headers in delivery class

integer $priority = 3 (line 119)

Priority header

string $references = '' (line 97)

References header

array|object AddressStructure $reply_to = array() (line 62)

Reply-To header

string|object AddressStructure $sender = '' (line 57)
string $subject = '' (line 48)

Subject header

String contains raw 8bit text in composed messages and rfc2047 encoded text in read messages

array $to = array() (line 72)

To header

string $xmailer = '' (line 114)

X-Mailer header

array $x_spam_status = array() (line 136)

SpamAssassin 'x-spam-status' header

Methods
createAddressObject (line 474)
  • 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 912)

Extracts email addresses from headers.

  • return: array, boolean
mixed findAddress (array|string $address, [boolean $recurs = false])
  • array|string $address: email address or array with multiple email addresses
  • boolean $recurs
getAddressTokens (line 341)
array getAddressTokens (string $address)
  • string $address
getAddr_a (line 871)

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 828)

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: return encoded or plain text addresses
getContentType (line 978)
  • 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 754)

Fills mlist array keys in rfc822Header object

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

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 646)
void parseContentType (string $value)
  • string $value: content type header
parseDisposition (line 734)

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

Redefined in descendants as:
parseHeader (line 147)
void parseHeader (mixed $hdr)
  • mixed $hdr: string or array with message headers
parsePriority (line 639)

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.

integer parsePriority (string $sValue)
  • string $sValue: literal priority name
parseProperties (line 712)
array parseProperties (string $value)
  • string $value
parseSpamStatus (line 776)

Parses the X-Spam-Status header

array parseSpamStatus (string $value)
  • string $value
processParameters (line 671)

RFC2184

array processParameters (array $aParameters)
  • array $aParameters

Redefined in descendants as:
stripComments (line 177)
string stripComments (string $value)
  • string $value

Documentation generated on Sun, 22 Nov 2009 17:36:44 +0200 by phpDocumentor 1.4.3