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)  

Message Class Reference

Public Member Functions

 setEnt ($ent)
 
 addEntity ($msg)
 
 getFilename ()
 
 addRFC822Header ($read)
 
 getEntity ($ent)
 
 setBody ($s)
 
 clean_up ()
 
 getMailbox ()
 
 parseStructure ($read, &$i, $sub_msg='')
 
 setEntIds (&$msg, $init=false, $i=0)
 
 parseBodyStructure ($read, &$i, $sub_msg='')
 
 parseProperties ($read, &$i)
 
 parseEnvelope ($read, &$i, $hdr)
 
 parseLiteral ($read, &$i)
 
 parseQuote ($read, &$i)
 
 parseAddress ($read, &$i)
 
 parseDisposition ($read, &$i)
 
 parseLanguage ($read, &$i)
 
 parseParenthesis ($read, $i)
 
 parseMessage ($read, $type0, $type1)
 
 findDisplayEntity ($entity=array(), $alt_order=array('text/plain', 'text/html'), $strict=false)
 
 findAlternativeEntity ($alt_order)
 
 findRelatedEntity ()
 
 getAttachments ($exclude_id=array(), $result=array())
 
 initAttachment ($type, $name, $location)
 
 purgeAttachments ()
 

Public Attributes

 $rfc822_header = ''
 
 $reply_rfc822_header = ''
 
 $mime_header = ''
 
 $flags = ''
 
 $type0 =''
 
 $type1 =''
 
 $entities = array()
 
 $entity_id = ''
 
 $parent_ent
 
 $entity
 
 $parent = ''
 
 $decoded_body =''
 
 $is_seen = 0
 
 $is_answered = 0
 
 $is_deleted = 0
 
 $is_flagged = 0
 
 $is_mdnsent = 0
 
 $body_part = ''
 
 $offset = 0
 
 $length = 0
 
 $att_local_name = ''
 

Detailed Description

Definition at line 27 of file Message.class.php.

Member Function Documentation

◆ addEntity()

Message::addEntity (   $msg)

Add nested message part

Parameters
object$msg

Definition at line 144 of file Message.class.php.

◆ addRFC822Header()

Message::addRFC822Header (   $read)

Add header object to message object. WARNING: Unfinished code. Don't expect it to work in older sm versions.

Parameters
mixed$readarray or string with message headers
Todo:
FIXME: rfc822header->parseHeader() does not return rfc822header object

Definition at line 197 of file Message.class.php.

References $header, $read, and rfc822_header.

◆ clean_up()

Message::clean_up ( )

Clean message object

Definition at line 259 of file Message.class.php.

◆ findAlternativeEntity()

Message::findAlternativeEntity (   $alt_order)
Parameters
array$alt_order
Returns
entity

Definition at line 1000 of file Message.class.php.

References $entity, and $j.

Referenced by findDisplayEntity().

◆ findDisplayEntity()

Message::findDisplayEntity (   $entity = array(),
  $alt_order = array('text/plain', 'text/html'),
  $strict = false 
)
Parameters
array$entity
array$alt_order
boolean$strict
Returns
array

Definition at line 921 of file Message.class.php.

References $entity, $entity_id, $msgs, $type1, findAlternativeEntity(), and findRelatedEntity().

◆ findRelatedEntity()

Message::findRelatedEntity ( )
Returns
array

Definition at line 1026 of file Message.class.php.

References $msgs.

Referenced by findDisplayEntity().

◆ getAttachments()

Message::getAttachments (   $exclude_id = array(),
  $result = array() 
)
Parameters
array$exclude_id
array$result
Returns
array

Definition at line 1046 of file Message.class.php.

References $entity.

◆ getEntity()

Message::getEntity (   $ent)
Parameters
string$ent
Returns
mixed (object or string?)

Definition at line 206 of file Message.class.php.

References $entity_id.

◆ getFilename()

Message::getFilename ( )

Get file name used for mime part

Returns
string file name
Since
1.3.2

Definition at line 153 of file Message.class.php.

References $filename, $header, and decodeHeader().

◆ getMailbox()

Message::getMailbox ( )
Returns
string

Definition at line 271 of file Message.class.php.

◆ initAttachment()

Message::initAttachment (   $type,
  $name,
  $location 
)

Add attachment to message object

Parameters
string$typeattachment type
string$nameattachment name
string$locationpath to attachment

Definition at line 1090 of file Message.class.php.

References $location, and $mime_header.

◆ parseAddress()

Message::parseAddress (   $read,
$i 
)
Parameters
string$read
integer$i
Returns
object AddressStructure object

Definition at line 739 of file Message.class.php.

References $read, parseLiteral(), and parseQuote().

Referenced by parseEnvelope().

◆ parseBodyStructure()

Message::parseBodyStructure (   $read,
$i,
  $sub_msg = '' 
)
Parameters
string$read
integer$i
mixed$sub_msg
Returns
object Message object
Todo:
document me
Since
1.4.0 (code was part of parseStructure() in 1.3.x)

Definition at line 345 of file Message.class.php.

References $cnt, $message, and $read.

Referenced by parseStructure().

◆ parseDisposition()

Message::parseDisposition (   $read,
$i 
)
Parameters
string$read
integer$i
objectDisposition object or empty string

Definition at line 774 of file Message.class.php.

References $read, parseLiteral(), parseProperties(), and parseQuote().

◆ parseEnvelope()

Message::parseEnvelope (   $read,
$i,
  $hdr 
)
Parameters
string$read
integer$i
object$hdrMessageHeader object
Returns
object MessageHeader object

Definition at line 556 of file Message.class.php.

References $cnt, $j, $read, _(), getTimeStamp(), parseAddress(), parseLiteral(), and parseQuote().

◆ parseLanguage()

Message::parseLanguage (   $read,
$i 
)
Parameters
string$read
integer$i
Returns
object Language object or empty string

Definition at line 799 of file Message.class.php.

References $read, parseLiteral(), parseProperties(), and parseQuote().

◆ parseLiteral()

Message::parseLiteral (   $read,
$i 
)
Parameters
string$read
integer$i
Returns
string
Todo:
document me

Definition at line 646 of file Message.class.php.

References $read.

Referenced by parseAddress(), parseDisposition(), parseEnvelope(), parseLanguage(), parseParenthesis(), and parseProperties().

◆ parseMessage()

Message::parseMessage (   $read,
  $type0,
  $type1 
)

Function to fill the message structure in case the bodystructure is not available NOT FINISHED YET

Parameters
string$read
string$type0message part type
string$type1message part subtype
Returns
string (only when type0 is not message or multipart)

Definition at line 848 of file Message.class.php.

References $bnd_end, $body, $boundaries, $cnt, $content_indx, $count, $header, $mime_header, $read, $rfc822_header, and $type0.

◆ parseParenthesis()

Message::parseParenthesis (   $read,
  $i 
)

Parse message text enclosed in parenthesis

Parameters
string$read
integer$i
Returns
integer

Definition at line 827 of file Message.class.php.

References $read, parseLiteral(), parseProperties(), and parseQuote().

◆ parseProperties()

Message::parseProperties (   $read,
$i 
)
Parameters
string$read
integer$i
Returns
array

Definition at line 525 of file Message.class.php.

References $read, parseLiteral(), and parseQuote().

Referenced by parseDisposition(), parseLanguage(), and parseParenthesis().

◆ parseQuote()

Message::parseQuote (   $read,
$i 
)

function parseQuote

This extract the string value from a quoted string. After the end-quote character is found it returns the string. The offset $i when calling this function points to the first double quote. At the end it points to The ending quote. This function takes care of escaped double quotes. "some \"string"" ^ ^ initial $i end position $i

Parameters
string$read
integer$ioffset in $read
Returns
string string inbetween the double quotes
Author
Marc Groot Koerkamp

Definition at line 682 of file Message.class.php.

References $j, and $read.

Referenced by parseAddress(), parseDisposition(), parseEnvelope(), parseLanguage(), parseParenthesis(), and parseProperties().

◆ parseStructure()

Message::parseStructure (   $read,
$i,
  $sub_msg = '' 
)

Definition at line 295 of file Message.class.php.

References $read, and parseBodyStructure().

Referenced by mime_structure().

◆ purgeAttachments()

Message::purgeAttachments ( )

Delete all attachments from this object from disk.

Since
1.4.6

Definition at line 1113 of file Message.class.php.

References $attachment_dir, $username, and getHashedDir().

◆ setBody()

Message::setBody (   $s)

Set message body

Parameters
string$smessage body

Definition at line 252 of file Message.class.php.

◆ setEnt()

Message::setEnt (   $ent)
Parameters
string$ententity id

Definition at line 136 of file Message.class.php.

◆ setEntIds()

Message::setEntIds ( $msg,
  $init = false,
  $i = 0 
)
Parameters
object$msg
mixed$init
integer$i
Todo:
document me
Since
1.4.0

Definition at line 308 of file Message.class.php.

Member Data Documentation

◆ $att_local_name

Message::$att_local_name = ''

Definition at line 131 of file Message.class.php.

◆ $body_part

Message::$body_part = ''

Definition at line 113 of file Message.class.php.

◆ $decoded_body

Message::$decoded_body =''

Definition at line 83 of file Message.class.php.

◆ $entities

Message::$entities = array()

Definition at line 61 of file Message.class.php.

◆ $entity

Message::$entity

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

Referenced by findAlternativeEntity(), findDisplayEntity(), and getAttachments().

◆ $entity_id

Message::$entity_id = ''

Definition at line 66 of file Message.class.php.

Referenced by findDisplayEntity(), and getEntity().

◆ $flags

Message::$flags = ''

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

◆ $is_answered

Message::$is_answered = 0

Definition at line 93 of file Message.class.php.

◆ $is_deleted

Message::$is_deleted = 0

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

◆ $is_flagged

Message::$is_flagged = 0

Definition at line 103 of file Message.class.php.

◆ $is_mdnsent

Message::$is_mdnsent = 0

Definition at line 108 of file Message.class.php.

◆ $is_seen

Message::$is_seen = 0

Definition at line 88 of file Message.class.php.

◆ $length

Message::$length = 0

Definition at line 125 of file Message.class.php.

◆ $mime_header

Message::$mime_header = ''

Definition at line 42 of file Message.class.php.

Referenced by initAttachment(), and parseMessage().

◆ $offset

Message::$offset = 0

Definition at line 119 of file Message.class.php.

◆ $parent

Message::$parent = ''

Definition at line 79 of file Message.class.php.

◆ $parent_ent

Message::$parent_ent

Definition at line 71 of file Message.class.php.

◆ $reply_rfc822_header

Message::$reply_rfc822_header = ''

Definition at line 37 of file Message.class.php.

◆ $rfc822_header

Message::$rfc822_header = ''

Definition at line 32 of file Message.class.php.

Referenced by parseMessage().

◆ $type0

Message::$type0 =''

Definition at line 51 of file Message.class.php.

Referenced by parseMessage().

◆ $type1

Message::$type1 =''

Definition at line 56 of file Message.class.php.

Referenced by findDisplayEntity().


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