\Horde_ActiveSync_Message_Mail

Horde_ActiveSync_Message_Mail::

Summary

Methods
Properties
Constants
__construct()
__destruct()
getProtocolVersion()
propertyExists()
__get()
__set()
__call()
__isset()
setSupported()
getSupported()
isGhosted()
decodeStream()
encodeStream()
isEmpty()
draftToMime()
addAttachment()
getClass()
$flags
$commandType
$to
$cc
$from
$subject
$threadtopic
$datereceived
$displayto
$importance
$mimetruncated
$mimedata
$mimesize
$messageclass
$meetingrequest
$reply_to
$read
$integer
$attachments
$bodytruncated
$bodysize
$body
$airsyncbasenativebodytype
$airsyncbasebody
$airsyncbaseattachments
$contentclass
$flag
$isdraft
$bcc
$send
$messageid
$answered
$forwarded
KEY_ATTRIBUTE
KEY_VALUES
KEY_TYPE
KEY_PROPERTY
TYPE_DATE
TYPE_HEX
TYPE_DATE_DASHES
TYPE_MAPI_STREAM
TYPE_MAPI_GOID
TYPE_DATE_LOCAL
PROPERTY_NO_CONTAINER
POOMMAIL_ATTACHMENT
POOMMAIL_ATTACHMENTS
POOMMAIL_BODY
POOMMAIL_BODYSIZE
POOMMAIL_BODYTRUNCATED
POOMMAIL_DATERECEIVED
POOMMAIL_DISPLAYTO
POOMMAIL_IMPORTANCE
POOMMAIL_MESSAGECLASS
POOMMAIL_SUBJECT
POOMMAIL_READ
POOMMAIL_TO
POOMMAIL_CC
POOMMAIL_FROM
POOMMAIL_REPLY_TO
POOMMAIL_ALLDAYEVENT
POOMMAIL_CATEGORIES
POOMMAIL_CATEGORY
POOMMAIL_DTSTAMP
POOMMAIL_ENDTIME
POOMMAIL_INSTANCETYPE
POOMMAIL_BUSYSTATUS
POOMMAIL_LOCATION
POOMMAIL_MEETINGREQUEST
POOMMAIL_ORGANIZER
POOMMAIL_RECURRENCEID
POOMMAIL_REMINDER
POOMMAIL_RESPONSEREQUESTED
POOMMAIL_RECURRENCES
POOMMAIL_RECURRENCE
POOMMAIL_TYPE
POOMMAIL_UNTIL
POOMMAIL_OCCURRENCES
POOMMAIL_INTERVAL
POOMMAIL_DAYOFWEEK
POOMMAIL_DAYOFMONTH
POOMMAIL_WEEKOFMONTH
POOMMAIL_MONTHOFYEAR
POOMMAIL_STARTTIME
POOMMAIL_SENSITIVITY
POOMMAIL_TIMEZONE
POOMMAIL_GLOBALOBJID
POOMMAIL_THREADTOPIC
POOMMAIL_MIMEDATA
POOMMAIL_MIMETRUNCATED
POOMMAIL_MIMESIZE
POOMMAIL_INTERNETCPID
POOMMAIL_CONTENTCLASS
POOMMAIL_FLAG
POOMMAIL_COMPLETETIME
POOMMAIL_DISALLOWNEWTIMEPROPOSAL
POOMMAIL2_UMCALLERID
POOMMAIL2_UMUSERNOTES
POOMMAIL2_UMATTDURATION
POOMMAIL2_UMATTORDER
POOMMAIL2_CONVERSATIONID
POOMMAIL2_CONVERSATIONINDEX
POOMMAIL2_LASTVERBEXECUTED
POOMMAIL2_LASTVERBEXECUTIONTIME
POOMMAIL2_RECEIVEDASBCC
POOMMAIL2_SENDER
POOMMAIL2_CALENDARTYPE
POOMMAIL2_ISLEAPMONTH
POOMMAIL2_ACCOUNTID
POOMMAIL2_FIRSTDAYOFWEEK
POOMMAIL2_MEETINGMESSAGETYPE
POOMMAIL2_ISDRAFT
POOMMAIL2_BCC
POOMMAIL2_SEND
CLASS_NOTE
CLASS_MEETING_REQUEST
CLASS_MEETING_NOTICE
FLAG_READ_UNSEEN
FLAG_READ_SEEN
INTERNET_CPID_UTF8
IMPORTANCE_LOW
IMPORTANCE_NORM
IMPORTANCE_HIGH
VERB_NONE
VERB_REPLY_SENDER
VERB_REPLY_ALL
VERB_FORWARD
_validateDecodedValues()
_preEncodeValidation()
_checkEncoding()
_checkSendEmpty()
_getAttribute()
_formatDate()
_parseDate()
$_mapping
$_properties
$_logger
$_supported
$_exists
$_version
$_device
$_streamFilters
N/A
_hex2bin()
No private properties found
N/A

Constants

KEY_ATTRIBUTE

KEY_ATTRIBUTE

KEY_VALUES

KEY_VALUES

KEY_TYPE

KEY_TYPE

KEY_PROPERTY

KEY_PROPERTY

TYPE_DATE

TYPE_DATE

TYPE_HEX

TYPE_HEX

TYPE_DATE_DASHES

TYPE_DATE_DASHES

TYPE_MAPI_STREAM

TYPE_MAPI_STREAM

TYPE_MAPI_GOID

TYPE_MAPI_GOID

TYPE_DATE_LOCAL

TYPE_DATE_LOCAL

PROPERTY_NO_CONTAINER

PROPERTY_NO_CONTAINER

POOMMAIL_ATTACHMENT

POOMMAIL_ATTACHMENT

POOMMAIL_ATTACHMENTS

POOMMAIL_ATTACHMENTS

POOMMAIL_BODY

POOMMAIL_BODY

POOMMAIL_BODYSIZE

POOMMAIL_BODYSIZE

POOMMAIL_BODYTRUNCATED

POOMMAIL_BODYTRUNCATED

POOMMAIL_DATERECEIVED

POOMMAIL_DATERECEIVED

POOMMAIL_DISPLAYTO

POOMMAIL_DISPLAYTO

POOMMAIL_IMPORTANCE

POOMMAIL_IMPORTANCE

POOMMAIL_MESSAGECLASS

POOMMAIL_MESSAGECLASS

POOMMAIL_SUBJECT

POOMMAIL_SUBJECT

POOMMAIL_READ

POOMMAIL_READ

POOMMAIL_TO

POOMMAIL_TO

POOMMAIL_CC

POOMMAIL_CC

POOMMAIL_FROM

POOMMAIL_FROM

POOMMAIL_REPLY_TO

POOMMAIL_REPLY_TO

POOMMAIL_ALLDAYEVENT

POOMMAIL_ALLDAYEVENT

POOMMAIL_CATEGORIES

POOMMAIL_CATEGORIES

POOMMAIL_CATEGORY

POOMMAIL_CATEGORY

POOMMAIL_DTSTAMP

POOMMAIL_DTSTAMP

POOMMAIL_ENDTIME

POOMMAIL_ENDTIME

POOMMAIL_INSTANCETYPE

POOMMAIL_INSTANCETYPE

POOMMAIL_BUSYSTATUS

POOMMAIL_BUSYSTATUS

POOMMAIL_LOCATION

POOMMAIL_LOCATION

POOMMAIL_MEETINGREQUEST

POOMMAIL_MEETINGREQUEST

POOMMAIL_ORGANIZER

POOMMAIL_ORGANIZER

POOMMAIL_RECURRENCEID

POOMMAIL_RECURRENCEID

POOMMAIL_REMINDER

POOMMAIL_REMINDER

POOMMAIL_RESPONSEREQUESTED

POOMMAIL_RESPONSEREQUESTED

POOMMAIL_RECURRENCES

POOMMAIL_RECURRENCES

POOMMAIL_RECURRENCE

POOMMAIL_RECURRENCE

POOMMAIL_TYPE

POOMMAIL_TYPE

POOMMAIL_UNTIL

POOMMAIL_UNTIL

POOMMAIL_OCCURRENCES

POOMMAIL_OCCURRENCES

POOMMAIL_INTERVAL

POOMMAIL_INTERVAL

POOMMAIL_DAYOFWEEK

POOMMAIL_DAYOFWEEK

POOMMAIL_DAYOFMONTH

POOMMAIL_DAYOFMONTH

POOMMAIL_WEEKOFMONTH

POOMMAIL_WEEKOFMONTH

POOMMAIL_MONTHOFYEAR

POOMMAIL_MONTHOFYEAR

POOMMAIL_STARTTIME

POOMMAIL_STARTTIME

POOMMAIL_SENSITIVITY

POOMMAIL_SENSITIVITY

POOMMAIL_TIMEZONE

POOMMAIL_TIMEZONE

POOMMAIL_GLOBALOBJID

POOMMAIL_GLOBALOBJID

POOMMAIL_THREADTOPIC

POOMMAIL_THREADTOPIC

POOMMAIL_MIMEDATA

POOMMAIL_MIMEDATA

POOMMAIL_MIMETRUNCATED

POOMMAIL_MIMETRUNCATED

POOMMAIL_MIMESIZE

POOMMAIL_MIMESIZE

POOMMAIL_INTERNETCPID

POOMMAIL_INTERNETCPID

POOMMAIL_CONTENTCLASS

POOMMAIL_CONTENTCLASS

POOMMAIL_FLAG

POOMMAIL_FLAG

POOMMAIL_COMPLETETIME

POOMMAIL_COMPLETETIME

POOMMAIL_DISALLOWNEWTIMEPROPOSAL

POOMMAIL_DISALLOWNEWTIMEPROPOSAL

POOMMAIL2_UMCALLERID

POOMMAIL2_UMCALLERID

POOMMAIL2_UMUSERNOTES

POOMMAIL2_UMUSERNOTES

POOMMAIL2_UMATTDURATION

POOMMAIL2_UMATTDURATION

POOMMAIL2_UMATTORDER

POOMMAIL2_UMATTORDER

POOMMAIL2_CONVERSATIONID

POOMMAIL2_CONVERSATIONID

POOMMAIL2_CONVERSATIONINDEX

POOMMAIL2_CONVERSATIONINDEX

POOMMAIL2_LASTVERBEXECUTED

POOMMAIL2_LASTVERBEXECUTED

POOMMAIL2_LASTVERBEXECUTIONTIME

POOMMAIL2_LASTVERBEXECUTIONTIME

POOMMAIL2_RECEIVEDASBCC

POOMMAIL2_RECEIVEDASBCC

POOMMAIL2_SENDER

POOMMAIL2_SENDER

POOMMAIL2_CALENDARTYPE

POOMMAIL2_CALENDARTYPE

POOMMAIL2_ISLEAPMONTH

POOMMAIL2_ISLEAPMONTH

POOMMAIL2_ACCOUNTID

POOMMAIL2_ACCOUNTID

POOMMAIL2_FIRSTDAYOFWEEK

POOMMAIL2_FIRSTDAYOFWEEK

POOMMAIL2_MEETINGMESSAGETYPE

POOMMAIL2_MEETINGMESSAGETYPE

POOMMAIL2_ISDRAFT

POOMMAIL2_ISDRAFT

POOMMAIL2_BCC

POOMMAIL2_BCC

POOMMAIL2_SEND

POOMMAIL2_SEND

CLASS_NOTE

CLASS_NOTE

CLASS_MEETING_REQUEST

CLASS_MEETING_REQUEST

CLASS_MEETING_NOTICE

CLASS_MEETING_NOTICE

FLAG_READ_UNSEEN

FLAG_READ_UNSEEN

FLAG_READ_SEEN

FLAG_READ_SEEN

INTERNET_CPID_UTF8

INTERNET_CPID_UTF8

IMPORTANCE_LOW

IMPORTANCE_LOW

IMPORTANCE_NORM

IMPORTANCE_NORM

IMPORTANCE_HIGH

IMPORTANCE_HIGH

VERB_NONE

VERB_NONE

VERB_REPLY_SENDER

VERB_REPLY_SENDER

VERB_REPLY_ALL

VERB_REPLY_ALL

VERB_FORWARD

VERB_FORWARD

Properties

$flags

$flags : \Horde_ActiveSync::FLAG_*

Message flags

Type

\Horde_ActiveSync::FLAG_* — constant

$commandType

$commandType : string

Request type. One of: Horde_ActiveSync::SYNC_ADD, SYNC_MODIFY, SYNC_REMOVE, or SYNC_FETCH. Used internally for enforcing various protocol rules depending on request.

@since 2.31.0

Type

string

$to

$to : string

Type

string

$cc

$cc : string

Type

string

$from

$from : string

Type

string

$subject

$subject : string

Type

string

$threadtopic

$threadtopic : string

Type

string

$datereceived

$datereceived : \Horde_Date

Type

\Horde_Date

$displayto

$displayto : string

Type

string

$importance

$importance : integer

Type

integer

$mimetruncated

$mimetruncated : integer

Type

integer

$mimedata

$mimedata : string

Type

string

$mimesize

$mimesize : integer

Type

integer

$messageclass

$messageclass : integer

Type

integer

$meetingrequest

$meetingrequest : \Horde_ActiveSync_Message_MeetingRequest

Type

\Horde_ActiveSync_Message_MeetingRequest

$reply_to

$reply_to : string

Type

string

$read

$read : integer

Type

integer

$integer

$integer : \cpid

The codepage id.

Type

\cpid

$attachments

$attachments : \Horde_ActiveSync_Message_Attachments

(EAS 2.5 only).

Type

\Horde_ActiveSync_Message_Attachments

$bodytruncated

$bodytruncated : integer

(EAS 2.5 only)

Type

integer

$bodysize

$bodysize : integer

(EAS 2.5 only)

Type

integer

$body

$body : \stream|string

(EAS 2.5 only)

Type

\stream|string

$airsyncbasenativebodytype

$airsyncbasenativebodytype : integer

(EAS > 2.5 only).

Type

integer

$airsyncbasebody

$airsyncbasebody : \Horde_ActiveSync_Message_AirSyncBaseBody

(EAS > 2.5 only).

Type

\Horde_ActiveSync_Message_AirSyncBaseBody

$airsyncbaseattachments

$airsyncbaseattachments : \Horde_ActiveSync_Message_AirSyncBaseAttachments

(EAS > 2.5 only).

Type

\Horde_ActiveSync_Message_AirSyncBaseAttachments

$contentclass

$contentclass : integer

(EAS > 2.5 only).

Type

integer

$flag

$flag : \Horde_ActiveSync_Message_Flag

(EAS > 2.5 only).

Type

\Horde_ActiveSync_Message_Flag

$isdraft

$isdraft : boolean

(EAS 16.0 only).

Type

boolean

$bcc

$bcc : string

The bcc recipients (EAS 16.0 only).

Type

string

$send

$send : boolean

(EAS 16.0 only).

// Internal properties. Not streamed to device.

Type

boolean

$messageid

$messageid : string

@since 2.4.0

Type

string

$answered

$answered : boolean

@since 2.4.0

Type

boolean

$forwarded

$forwarded : boolean

@since 2.4.0

Type

boolean

$_mapping

$_mapping : array

Property mappings

Type

array

$_properties

$_properties : array

Property values.

Type

array

$_logger

$_logger : \Horde_Log_Logger

Logger

Type

\Horde_Log_Logger

$_supported

$_supported : array

An array describing the non-ghosted elements this message supports.

Type

array

$_exists

$_exists : array

Existence cache, used for working with ghosted properties.

Type

array

$_version

$_version : float

The version of EAS we are to support.

Type

float

$_streamFilters

$_streamFilters : array

Cache of current stream filters.

Type

array

Methods

__construct()

__construct(array  $options = array()) : \Horde_ActiveSync_Message_Base

Const'r

Parameters

array $options

Configuration options for the message:

  • logger: (Horde_Log_Logger) A logger instance DEFAULT: none (No logging).
  • protocolversion: (float) The version of EAS to support. DEFAULT: Horde_ActiveSync::VERSION_TWOFIVE (2.5)
  • device: (Horde_ActiveSync_Device) The device object. @since 2.9.2

Returns

\Horde_ActiveSync_Message_Base

__destruct()

__destruct() 

getProtocolVersion()

getProtocolVersion() : float

Return the EAS version this object supports.

Returns

float —

A HordeActiveSync::VERSION* constant.

propertyExists()

propertyExists(string  $property) : boolean

Check the existence of a property in this message.

Parameters

string $property

The property name

Returns

boolean

__get()

__get(string  $property) : mixed

Accessor

Parameters

string $property

Property to get.

Returns

mixed —

The value of the requested property.

__set()

__set(string  $property, mixed  $value) 

Setter

Parameters

string $property

The property to set.

mixed $value

The value to set it to.

Throws

\InvalidArgumentException

__call()

__call(mixed  $method, array  $arg) : mixed

Magic caller method.

Parameters

mixed $method

The method to call.

array $arg

Method arguments.

Returns

mixed

__isset()

__isset(string  $property) : \boolean.

Magic method.

Parameters

string $property

The property name to check.

Returns

\boolean.

setSupported()

setSupported(array  $fields) 

Set the list of non-ghosted fields for this message.

Parameters

array $fields

The array of fields, keyed by the fully qualified property name i.e., POOMCONTACTS:Anniversary. To signify an empty SUPPORTED container $fields should contain a single element equal to Horde_ActiveSync::ALL_GHOSTED.

getSupported()

getSupported() : array

Get the list of non-ghosted properties for this message.

Returns

array —

The array of non-ghosted properties

isGhosted()

isGhosted(string  $property) : boolean

Determines if the property specified has been ghosted by the client.

A property is ghosted if it is NOT listed in the SUPPORTED list sent by the client AND is NOT present in the request data.

Parameters

string $property

The property to check

Returns

boolean

decodeStream()

decodeStream(\Horde_ActiveSync_Wbxml_Decoder  $decoder) 

Recursively decodes the WBXML from input stream. This means that if this message contains complex types (like Appointment.Recuurence for example) the sub-objects are auto-instantiated and decoded as well. Places the decoded objects in the local properties array.

Parameters

\Horde_ActiveSync_Wbxml_Decoder $decoder

Throws

\Horde_ActiveSync_Exception

encodeStream()

encodeStream(\Horde_ActiveSync_Wbxml_Encoder  $encoder) 

Encodes this object (and any sub-objects) as wbxml to the output stream.

Output is ordered according to $_mapping

Parameters

\Horde_ActiveSync_Wbxml_Encoder $encoder

The wbxml stream encoder

Throws

\Horde_ActiveSync_Exception

isEmpty()

isEmpty() : boolean

Returns whether or not this message actually contains any data to send.

Returns

boolean —

True if message is empty, otherwise false.

draftToMime()

draftToMime() : array

Get a Horde_Mime object representint the data contained in this object.

[MS_ASEMAIL 3.1.53]

Returns

array —

An array containing:

  • part: Horde_Mime_Part containing the body data NO ATTACHMENTS.
  • headers: Horde_Mime_Headers containing the envelope headers.

addAttachment()

addAttachment(\Horde_ActiveSync_Message_AirSyncBaseAttachment  $atc) 

Add an AirSyncBaseAttachment object to this message.

Parameters

\Horde_ActiveSync_Message_AirSyncBaseAttachment $atc

Throws

\Horde_ActiveSync_Exception

getClass()

getClass() : string

Return the class type for this object.

Returns

string

_validateDecodedValues()

_validateDecodedValues() : boolean

Give concrete classes the chance to enforce rules.

Returns

boolean —

True on success, otherwise false.

_preEncodeValidation()

_preEncodeValidation() : boolean

Give concrete classes the chance to enforce rules before encoding messages to send to the client.

Returns

boolean —

True if values were valid (or could be made valid). False if values are unable to be validated.

_checkEncoding()

_checkEncoding(mixed  $data, string  $tag) : mixed

Checks if the data needs to be encoded like e.g., when outputing binary data in-line during ITEMOPERATIONS requests. Concrete classes should override this if needed.

Parameters

mixed $data

The data to check. A string or stream resource.

string $tag

The tag we are outputing.

Returns

mixed —

The encoded data. A string or stream resource with a filter attached.

_checkSendEmpty()

_checkSendEmpty(string  $tag) : boolean

Checks to see if we should send an empty value.

Parameters

string $tag

The tag name

Returns

boolean

_getAttribute()

_getAttribute(string  $name, \stting  $default = null) : mixed

Helper method to allow default values for unset properties.

Parameters

string $name

The property name

\stting $default

The default value to return if $property is empty

Returns

mixed

_formatDate()

_formatDate(\Horde_Date  $dt, integer  $type) : string

Oh yeah. This is beautiful. Exchange outputs date fields differently in calendar items and emails. We could just always send one or the other, but unfortunately nokia's 'Mail for exchange' depends on this quirk.

So we have to send a different date type depending on where it's used. Used when encoding a date value to send to the client.

Parameters

\Horde_Date $dt

The Horde_Date object to format (should normally be in local tz).

integer $type

The type to format as: One of TYPE_DATE or TYPE_DATE_DASHES, TYPE_DATE_LOCAL

Throws

\InvalidArgumentException

Returns

string —

The formatted date

_parseDate()

_parseDate(string  $ts) : \Horde_Date|boolean

Get a Horde_Date from a timestamp, ensuring it's in the correct format.

Used when decoding an incoming date value from the client.

Parameters

string $ts

The timestamp

Returns

\Horde_Date|boolean —

The Horde_Date or false if unable to decode.

_hex2bin()

_hex2bin(string  $data) : string

Function which converts a hex entryid to a binary entryid.

Parameters

string $data

The hexadecimal string

Returns

string —

The binary data