static method parseBodyStructure (line
345 )
- return: object
- todo: document me
- since: 1.4.0 (code was part of parseStructure() in 1.3.x)
static
object Message
parseBodyStructure
(
string $read,
&$i, [
mixed $sub_msg =
''],
integer $i)
-
string
$read
-
integer
$i
-
mixed
$sub_msg
-
&$i
static method parseStructure (line
295 )
static
void
parseStructure
( $read, &$i, [ $sub_msg = ''])
Add nested message part
void
addEntity
(object $msg)
addRFC822Header (line
197 )
Add header object to message object.
WARNING: Unfinished code. Don't expect it to work in older sm versions.
- todo: FIXME: rfc822header->parseHeader() does not return rfc822header object
void
addRFC822Header
(mixed $read)
-
mixed
$read: array or string with message headers
Clean message object
void
clean_up
()
findAlternativeEntity (line
1001 )
entity
findAlternativeEntity
(array $alt_order)
findDisplayEntity (line
922 )
array
findDisplayEntity
([array $entity = array()], [array $alt_order = array('text/plain', 'text/html')], [boolean $strict = false])
-
array
$entity
-
array
$alt_order
-
boolean
$strict
findRelatedEntity (line
1027 )
array
findRelatedEntity
()
getAttachments (line
1047 )
array
getAttachments
([array $exclude_id = array()], [array $result = array()])
-
array
$exclude_id
-
array
$result
- return: (object or string?)
mixed
getEntity
(string $ent)
Get file name used for mime part
- return: file name
- since: 1.3.2
string
getFilename
()
initAttachment (line
1091 )
Add attachment to message object
void
initAttachment
(string $type, string $name, string $location)
-
string
$type: attachment type
-
string
$name: attachment name
-
string
$location: path to attachment
-
string
$read
-
integer
$i
-
&$i
parseDisposition (line
775 )
parseEnvelope (line
557 )
-
string
$read
-
integer
$i
-
object
$hdr: MessageHeader object
-
&$i
parseLanguage (line
800 )
- return: object or empty string
-
string
$read
-
integer
$i
-
&$i
string
parseLiteral
(string $read, &$i, integer $i)
-
string
$read
-
integer
$i
-
&$i
Function to fill the message structure in case the
bodystructure is not available NOT FINISHED YET
- return: (only when type0 is not message or multipart)
string
parseMessage
(string $read, string $type0, string $type1)
-
string
$read
-
string
$type0: message part type
-
string
$type1: message part subtype
parseParenthesis (line
828 )
Parse message text enclosed in parenthesis
integer
parseParenthesis
(string $read, integer $i)
parseProperties (line
526 )
array
parseProperties
(string $read, &$i, integer $i)
-
string
$read
-
integer
$i
-
&$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
- return: string inbetween the double quotes
- author: Marc Groot Koerkamp
string
parseQuote
(string $read, &$i, integer $i)
-
string
$read
-
integer
$i: offset in $read
-
&$i
purgeAttachments (line
1114 )
Delete all attachments from this object from disk.
void
purgeAttachments
()
Set message body
void
setBody
(string $s)
void
setEnt
(string $ent)
- todo: document me
- since: 1.4.0
void
setEntIds
( &$msg, [mixed $init = false], [integer $i = 0], object $msg)
-
object
$msg
-
mixed
$init
-
integer
$i
-
&$msg