squirrelmail-webmail  1.4.22
About: SquirrelMail is a standards-based webmail package with strong MIME support, address books, and folder manipulation (written in PHP4).
  Fossies Dox: squirrelmail-webmail-1.4.22.tar.gz  ("inofficial" and yet experimental doxygen-generated source code documentation)  

Rfc822Header Class Reference

Public Member Functions

 parseHeader ($hdr)
 
 stripComments ($value)
 
 parseField ($field, $value)
 
 getAddressTokens ($address)
 
 createAddressObject (&$aStack, &$aComment, &$sEmail, $sGroup='')
 
 parseAddress ($address, $ar=false, $aAddress=array(), $sGroup='', $sHost='', $lookup=false)
 
 parsePriority ($sValue)
 
 parseContentType ($value)
 
 processParameters ($aParameters)
 
 parseProperties ($value)
 
 parseDisposition ($value)
 
 mlist ($field, $value)
 
 parseSpamStatus ($value)
 
 getAddr_s ($arr, $separator=',', $encoded=false, $unconditionally_quote=FALSE)
 
 getAddr_a ($arg, $excl_arr=array(), $arr=array())
 
 findAddress ($address, $recurs=false)
 
 getContentType ($type0, $type1)
 

Public Attributes

 $date = -1
 
 $date_unparsed = ''
 
 $subject = ''
 
 $from = array()
 
 $sender = ''
 
 $reply_to = array()
 
 $mail_followup_to = array()
 
 $to = array()
 
 $cc = array()
 
 $bcc = array()
 
 $in_reply_to = ''
 
 $message_id = ''
 
 $references = ''
 
 $mime = false
 
 $content_type = ''
 
 $disposition = ''
 
 $xmailer = ''
 
 $priority = 3
 
 $dnt = ''
 
 $encoding = ''
 
 $mlist = array()
 
 $x_spam_status = array()
 
 $more_headers = array()
 

Detailed Description

Definition at line 26 of file Rfc822Header.class.php.

Member Function Documentation

◆ createAddressObject()

Rfc822Header::createAddressObject ( $aStack,
$aComment,
$sEmail,
  $sGroup = '' 
)
Parameters
array$aStack
array$aComment
string$sEmail
string$sGroup
Returns
object AddressStructure object

Definition at line 467 of file Rfc822Header.class.php.

References encodeHeader().

Referenced by parseAddress().

◆ findAddress()

Rfc822Header::findAddress (   $address,
  $recurs = false 
)

FIXME: This needs some documentation (inside the function too)! Don't code w/out comments!

Parameters
mixed$addressarray or string
boolean$recurs
Returns
mixed array, boolean
Since
1.3.2

Definition at line 928 of file Rfc822Header.class.php.

References $cc, $to, elseif, and parseAddress().

◆ getAddr_a()

Rfc822Header::getAddr_a (   $arg,
  $excl_arr = array(),
  $arr = array() 
)

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

Parameters
mixed$argstring or array of strings
array$excl_arrarray of excluded email addresses
array$arrarray of added email addresses
Returns
array

Definition at line 886 of file Rfc822Header.class.php.

◆ getAddr_s()

Rfc822Header::getAddr_s (   $arr,
  $separator = ',',
  $encoded = false,
  $unconditionally_quote = FALSE 
)

function to get the address strings out of the header. example1: header->getAddr_s('to'). example2: header->getAddr_s(array('to', 'cc', 'bcc'))

Parameters
mixed$arrstring or array of strings
string$separator
boolean$encoded(since 1.4.0) return encoded or plain text addresses
boolean$unconditionally_quote(since 1.4.21/1.5.2) When TRUE, always quote the personal part, whether or not it is encoded, otherwise quoting is only added if the personal part is not encoded
Returns
string

Definition at line 843 of file Rfc822Header.class.php.

◆ getAddressTokens()

Rfc822Header::getAddressTokens (   $address)
Parameters
string$address
Returns
array

Definition at line 334 of file Rfc822Header.class.php.

Referenced by parseAddress().

◆ getContentType()

Rfc822Header::getContentType (   $type0,
  $type1 
)
Parameters
string$type0media type
string$type1media subtype
Returns
array media properties
Todo:
check use of media type arguments

Definition at line 995 of file Rfc822Header.class.php.

References $type0, and $type1.

◆ mlist()

Rfc822Header::mlist (   $field,
  $value 
)

Fills mlist array keys in rfc822Header object

Parameters
string$field
string$value

Definition at line 764 of file Rfc822Header.class.php.

Referenced by parseField().

◆ parseAddress()

Rfc822Header::parseAddress (   $address,
  $ar = false,
  $aAddress = array(),
  $sGroup = '',
  $sHost = '',
  $lookup = false 
)

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

Parameters
string$address
boolean$arreturn array instead of only the first element
array$addr_ar(obsolete) array with parsed addresses
string$group(obsolete)
string$hostdefault domainname in case of addresses without a domainname
string$lookup(since) callback function for lookup of address strings which are probably nicks (without @)
Returns
mixed array with AddressStructure objects or only one address_structure object.

Definition at line 520 of file Rfc822Header.class.php.

References createAddressObject(), encodeHeader(), and getAddressTokens().

Referenced by findAddress(), and parseField().

◆ parseContentType()

Rfc822Header::parseContentType (   $value)
Parameters
string$valuecontent type header

Definition at line 656 of file Rfc822Header.class.php.

References $content_type, and parseProperties().

Referenced by parseField(), and parseHeader().

◆ parseDisposition()

Rfc822Header::parseDisposition (   $value)

Fills disposition object in rfc822Header object

Parameters
string$value

Definition at line 744 of file Rfc822Header.class.php.

References parseProperties().

Referenced by parseField().

◆ parseField()

Rfc822Header::parseField (   $field,
  $value 
)

Parse header field according to field type

Parameters
string$fieldfield name
string$valuefield value

Definition at line 217 of file Rfc822Header.class.php.

References $mime, getTimeStamp(), mlist(), parseAddress(), parseContentType(), parseDisposition(), parsePriority(), parseSpamStatus(), and stripComments().

Referenced by parseHeader().

◆ parseHeader()

Rfc822Header::parseHeader (   $hdr)
Parameters
mixed$hdrstring or array with message headers

Definition at line 140 of file Rfc822Header.class.php.

References parseContentType(), and parseField().

◆ parsePriority()

Rfc822Header::parsePriority (   $sValue)

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?

Parameters
string$sValueliteral priority name
Returns
integer

Definition at line 636 of file Rfc822Header.class.php.

References elseif.

Referenced by parseField().

◆ parseProperties()

Rfc822Header::parseProperties (   $value)
Parameters
string$value
Returns
array

Definition at line 722 of file Rfc822Header.class.php.

References processParameters().

Referenced by parseContentType(), and parseDisposition().

◆ parseSpamStatus()

Rfc822Header::parseSpamStatus (   $value)

Parses the X-Spam-Status header

Parameters
string$value

Definition at line 785 of file Rfc822Header.class.php.

References $tests.

Referenced by parseField().

◆ processParameters()

Rfc822Header::processParameters (   $aParameters)

RFC2184

Parameters
array$aParameters
Returns
array

Definition at line 681 of file Rfc822Header.class.php.

References $charset, and charset_decode().

Referenced by parseProperties().

◆ stripComments()

Rfc822Header::stripComments (   $value)
Parameters
string$value
Returns
string

Definition at line 170 of file Rfc822Header.class.php.

References $cnt.

Referenced by parseField().

Member Data Documentation

◆ $bcc

Rfc822Header::$bcc = array()

Definition at line 75 of file Rfc822Header.class.php.

◆ $cc

Rfc822Header::$cc = array()

Definition at line 70 of file Rfc822Header.class.php.

Referenced by findAddress().

◆ $content_type

Rfc822Header::$content_type = ''

Definition at line 98 of file Rfc822Header.class.php.

Referenced by parseContentType().

◆ $date

Rfc822Header::$date = -1

Definition at line 31 of file Rfc822Header.class.php.

◆ $date_unparsed

Rfc822Header::$date_unparsed = ''

Definition at line 36 of file Rfc822Header.class.php.

◆ $disposition

Rfc822Header::$disposition = ''

Definition at line 102 of file Rfc822Header.class.php.

◆ $dnt

Rfc822Header::$dnt = ''

Definition at line 116 of file Rfc822Header.class.php.

◆ $encoding

Rfc822Header::$encoding = ''

Definition at line 120 of file Rfc822Header.class.php.

◆ $from

Rfc822Header::$from = array()

Definition at line 46 of file Rfc822Header.class.php.

◆ $in_reply_to

Rfc822Header::$in_reply_to = ''

Definition at line 80 of file Rfc822Header.class.php.

◆ $mail_followup_to

Rfc822Header::$mail_followup_to = array()

Definition at line 60 of file Rfc822Header.class.php.

◆ $message_id

Rfc822Header::$message_id = ''

Definition at line 85 of file Rfc822Header.class.php.

◆ $mime

Rfc822Header::$mime = false

Definition at line 94 of file Rfc822Header.class.php.

Referenced by parseField().

◆ $mlist

Rfc822Header::$mlist = array()

Definition at line 124 of file Rfc822Header.class.php.

◆ $more_headers

Rfc822Header::$more_headers = array()

Definition at line 135 of file Rfc822Header.class.php.

◆ $priority

Rfc822Header::$priority = 3

Definition at line 112 of file Rfc822Header.class.php.

◆ $references

Rfc822Header::$references = ''

Definition at line 90 of file Rfc822Header.class.php.

◆ $reply_to

Rfc822Header::$reply_to = array()

Definition at line 55 of file Rfc822Header.class.php.

◆ $sender

Rfc822Header::$sender = ''

Definition at line 50 of file Rfc822Header.class.php.

◆ $subject

Rfc822Header::$subject = ''

Definition at line 41 of file Rfc822Header.class.php.

◆ $to

Rfc822Header::$to = array()

Definition at line 65 of file Rfc822Header.class.php.

Referenced by findAddress().

◆ $x_spam_status

Rfc822Header::$x_spam_status = array()

Definition at line 129 of file Rfc822Header.class.php.

◆ $xmailer

Rfc822Header::$xmailer = ''

Definition at line 107 of file Rfc822Header.class.php.


The documentation for this class was generated from the following file: