Horde_ActiveSync_Message_SendMail
        
        extends Horde_ActiveSync_Message_Base
    
    
            
            in package
            
        
    
    
    
        
            Horde_ActiveSync_Message_SendMail::
Tags
Table of Contents
- COMPOSEMAIL_ACCOUNTID = 'ComposeMail:AccountId'
- COMPOSEMAIL_CLIENTID = 'ComposeMail:ClientId'
- COMPOSEMAIL_FORWARDEE = 'ComposeMail:Forwardee'
- COMPOSEMAIL_FORWARDEEEMAIL = 'ComposeMail:ForwardeeEmail'
- COMPOSEMAIL_FORWARDEENAME = 'ComposeMail:ForwardeeName'
- COMPOSEMAIL_FORWARDEES = 'ComposeMail:Forwardees'
- COMPOSEMAIL_MIME = 'ComposeMail:MIME'
- COMPOSEMAIL_REPLACEMIME = 'ComposeMail:ReplaceMime'
- COMPOSEMAIL_SAVEINSENTITEMS = 'ComposeMail:SaveInSentItems'
- COMPOSEMAIL_SENDMAIL = 'ComposeMail:SendMail'
- COMPOSEMAIL_SMARTFORWARD = 'ComposeMail:SmartForward'
- COMPOSEMAIL_SMARTREPLY = 'ComposeMail:SmartReply'
- COMPOSEMAIL_SOURCE = 'ComposeMail:Source'
- COMPOSEMAIL_STATUS = 'ComposeMail:Status'
- COMPOSEMAIL_TYPE = 'ComposeMail:Type'
- KEY_ATTRIBUTE = 1
- KEY_PROPERTY = 4
- KEY_TYPE = 3
- KEY_VALUES = 2
- PROPERTY_NO_CONTAINER = 7
- TYPE_DATE = 1
- TYPE_DATE_DASHES = 3
- TYPE_DATE_LOCAL = 6
- TYPE_HEX = 2
- TYPE_MAPI_GOID = 5
- TYPE_MAPI_STREAM = 4
- $ : string|stream
- $accountid : string
- $clientid : string
- $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.
- $flags : mixed
- Message flags
- $forwardees : string
- $replacemime : bool
- $saveinsent : bool
- $source : Horde_ActiveSync_Message_SendMailSource
- $templateid : string
- $_device : Horde_ActiveSync_Device
- The device object
- $_exists : array<string|int, mixed>
- Existence cache, used for working with ghosted properties.
- $_logger : Horde_Log_Logger
- Logger
- $_mapping : array<string|int, mixed>
- Property mapping
- $_properties : array<string|int, mixed>
- Property values.
- $_streamFilters : array<string|int, mixed>
- Cache of current stream filters.
- $_supported : array<string|int, mixed>
- An array describing the non-ghosted elements this message supports.
- $_version : float
- The version of EAS we are to support.
- __call() : mixed
- Magic caller method.
- __construct() : Horde_ActiveSync_Message_Base
- Const'r
- __destruct() : mixed
- __get() : mixed
- Accessor
- __isset() : mixed
- Magic method.
- __set() : mixed
- Setter
- decodeStream() : mixed
- 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.
- encodeStream() : mixed
- Encodes this object (and any sub-objects) as wbxml to the output stream.
- getClass() : string
- Return this object's folder class
- getProtocolVersion() : float
- Return the EAS version this object supports.
- getSupported() : array<string|int, mixed>
- Get the list of non-ghosted properties for this message.
- isEmpty() : bool
- Returns whether or not this message actually contains any data to send.
- isGhosted() : bool
- Determines if the property specified has been ghosted by the client.
- propertyExists() : bool
- Check the existence of a property in this message.
- setSupported() : mixed
- Set the list of non-ghosted fields for this message.
- _checkEncoding() : 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.
- _checkSendEmpty() : bool
- Check if a field should be sent to the device even if it is empty.
- _formatDate() : 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.
- _getAttribute() : mixed
- Helper method to allow default values for unset properties.
- _parseDate() : Horde_Date|bool
- Get a Horde_Date from a timestamp, ensuring it's in the correct format.
- _preEncodeValidation() : bool
- Give concrete classes the chance to enforce rules before encoding messages to send to the client.
- _validateDecodedValues() : bool
- Give concrete classes the chance to enforce rules.
- _hex2bin() : string
- Function which converts a hex entryid to a binary entryid.
Constants
COMPOSEMAIL_ACCOUNTID
    public
        mixed
    COMPOSEMAIL_ACCOUNTID
    = 'ComposeMail:AccountId'
        
        
    
COMPOSEMAIL_CLIENTID
    public
        mixed
    COMPOSEMAIL_CLIENTID
    = 'ComposeMail:ClientId'
        
        
    
COMPOSEMAIL_FORWARDEE
    public
        mixed
    COMPOSEMAIL_FORWARDEE
    = 'ComposeMail:Forwardee'
        
        
    
COMPOSEMAIL_FORWARDEEEMAIL
    public
        mixed
    COMPOSEMAIL_FORWARDEEEMAIL
    = 'ComposeMail:ForwardeeEmail'
        
        
    
COMPOSEMAIL_FORWARDEENAME
    public
        mixed
    COMPOSEMAIL_FORWARDEENAME
    = 'ComposeMail:ForwardeeName'
        
        
    
COMPOSEMAIL_FORWARDEES
    public
        mixed
    COMPOSEMAIL_FORWARDEES
    = 'ComposeMail:Forwardees'
        
        
    
COMPOSEMAIL_MIME
    public
        mixed
    COMPOSEMAIL_MIME
    = 'ComposeMail:MIME'
        
        
    
COMPOSEMAIL_REPLACEMIME
    public
        mixed
    COMPOSEMAIL_REPLACEMIME
    = 'ComposeMail:ReplaceMime'
        
        
    
COMPOSEMAIL_SAVEINSENTITEMS
    public
        mixed
    COMPOSEMAIL_SAVEINSENTITEMS
    = 'ComposeMail:SaveInSentItems'
        
        
    
COMPOSEMAIL_SENDMAIL
    public
        mixed
    COMPOSEMAIL_SENDMAIL
    = 'ComposeMail:SendMail'
        
        
    
COMPOSEMAIL_SMARTFORWARD
    public
        mixed
    COMPOSEMAIL_SMARTFORWARD
    = 'ComposeMail:SmartForward'
        
        
    
COMPOSEMAIL_SMARTREPLY
    public
        mixed
    COMPOSEMAIL_SMARTREPLY
    = 'ComposeMail:SmartReply'
        
        
    
COMPOSEMAIL_SOURCE
    public
        mixed
    COMPOSEMAIL_SOURCE
    = 'ComposeMail:Source'
        
        
    
COMPOSEMAIL_STATUS
    public
        mixed
    COMPOSEMAIL_STATUS
    = 'ComposeMail:Status'
        
        
    
COMPOSEMAIL_TYPE
    public
        mixed
    COMPOSEMAIL_TYPE
    = 'ComposeMail:Type'
        
        
    
KEY_ATTRIBUTE
    public
        mixed
    KEY_ATTRIBUTE
    = 1
        
        
    
KEY_PROPERTY
    public
        mixed
    KEY_PROPERTY
    = 4
        
        
    
KEY_TYPE
    public
        mixed
    KEY_TYPE
    = 3
        
        
    
KEY_VALUES
    public
        mixed
    KEY_VALUES
    = 2
        
        
    
PROPERTY_NO_CONTAINER
    public
        mixed
    PROPERTY_NO_CONTAINER
    = 7
        
        
    
TYPE_DATE
    public
        mixed
    TYPE_DATE
    = 1
        
        
    
TYPE_DATE_DASHES
    public
        mixed
    TYPE_DATE_DASHES
    = 3
        
        
    
TYPE_DATE_LOCAL
    public
        mixed
    TYPE_DATE_LOCAL
    = 6
        
        
    
TYPE_HEX
    public
        mixed
    TYPE_HEX
    = 2
        
        
    
TYPE_MAPI_GOID
    public
        mixed
    TYPE_MAPI_GOID
    = 5
        
        
    
TYPE_MAPI_STREAM
    public
        mixed
    TYPE_MAPI_STREAM
    = 4
        
        
    
Properties
$
    public
        string|stream
    $
    
        mime The MIME contents of the message.
$accountid
    public
        string
    $accountid
    
        The accountid.
$clientid
    public
        string
    $clientid
    
        The client's temporary clientid for this item.
$commandType
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.
    public
        string
    $commandType
    
        @since 2.31.0
$flags
Message flags
    public
        mixed
    $flags
     = \false
    
        Horde_ActiveSync::FLAG_* constant
$forwardees
    public
        string
    $forwardees
    
        An array of Forwardee objects. EAS 16.0 Only.
$replacemime
    public
        bool
    $replacemime
    
        Flag to indicate we are replacing the Full MIME data (i.e., not a SMART item).
$saveinsent
    public
        bool
    $saveinsent
    
        Flag to indicate whether to save in sent mail.
$source
    public
        Horde_ActiveSync_Message_SendMailSource
    $source
    
        The email source.
$templateid
    public
        string
    $templateid
    
        The templateid.
$_device
The device object
    protected
        Horde_ActiveSync_Device
    $_device
    
    
    
    
    Tags
$_exists
Existence cache, used for working with ghosted properties.
    protected
        array<string|int, mixed>
    $_exists
     = array()
    
    
    
$_logger
Logger
    protected
        Horde_Log_Logger
    $_logger
    
    
    
    
$_mapping
Property mapping
    protected
        array<string|int, mixed>
    $_mapping
     = array(self::COMPOSEMAIL_CLIENTID => array(self::KEY_ATTRIBUTE => 'clientid'), self::COMPOSEMAIL_SAVEINSENTITEMS => array(self::KEY_ATTRIBUTE => 'saveinsent'), self::COMPOSEMAIL_REPLACEMIME => array(self::KEY_ATTRIBUTE => 'replacemime'), self::COMPOSEMAIL_ACCOUNTID => array(self::KEY_ATTRIBUTE => 'accountid'), self::COMPOSEMAIL_SOURCE => array(self::KEY_ATTRIBUTE => 'source', self::KEY_TYPE => 'Horde_ActiveSync_Message_SendMailSource'), self::COMPOSEMAIL_MIME => array(self::KEY_ATTRIBUTE => 'mime'), \Horde_ActiveSync::RM_TEMPLATEID => array(self::KEY_ATTRIBUTE => 'templateid'))
    
    
    
$_properties
Property values.
    protected
        array<string|int, mixed>
    $_properties
     = array('clientid' => \false, 'saveinsent' => \false, 'replacemime' => \false, 'accountid' => \false, 'source' => \false, 'mime' => \false, 'templateid' => \false)
    
    
    
$_streamFilters
Cache of current stream filters.
    protected
        array<string|int, mixed>
    $_streamFilters
     = array()
    
    
    
$_supported
An array describing the non-ghosted elements this message supports.
    protected
        array<string|int, mixed>
    $_supported
     = array()
    
    
    
$_version
The version of EAS we are to support.
    protected
        float
    $_version
     = \Horde_ActiveSync::VERSION_TWOFIVE
    
    
    
Methods
__call()
Magic caller method.
    public
                    __call(mixed $method, array<string|int, mixed> $arg) : mixed
    
        Parameters
- $method : mixed
- 
                    The method to call. 
- $arg : array<string|int, mixed>
- 
                    Method arguments. 
Return values
mixed —__construct()
Const'r
    public
                    __construct([array<string|int, mixed> $options = array() ]) : Horde_ActiveSync_Message_Base
    
        Parameters
- $options : array<string|int, mixed> = array()
- 
                    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
 
Tags
Return values
Horde_ActiveSync_Message_Base —__destruct()
    public
                    __destruct() : mixed
        
    
    
        Return values
mixed —__get()
Accessor
    public
                &    __get(mixed $property) : mixed
    
        Parameters
- $property : mixed
- 
                    Property to get. 
Return values
mixed —The value of the requested property.
__isset()
Magic method.
    public
                    __isset(string $property) : mixed
    
        Parameters
- $property : string
- 
                    The property name to check. 
Return values
mixed —__set()
Setter
    public
                    __set(string $property, mixed $value) : mixed
    
        Parameters
- $property : string
- 
                    The property to set. 
- $value : mixed
- 
                    The value to set it to. 
Tags
Return values
mixed —decodeStream()
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.
    public
                    decodeStream(Horde_ActiveSync_Wbxml_Decoder &$decoder) : mixed
    
        Parameters
- $decoder : Horde_ActiveSync_Wbxml_Decoder
Tags
Return values
mixed —encodeStream()
Encodes this object (and any sub-objects) as wbxml to the output stream.
    public
                    encodeStream(Horde_ActiveSync_Wbxml_Encoder &$encoder) : mixed
        Output is ordered according to $_mapping
Parameters
- $encoder : Horde_ActiveSync_Wbxml_Encoder
- 
                    The wbxml stream encoder 
Tags
Return values
mixed —getClass()
Return this object's folder class
    public
                    getClass() : string
    
    
    
        Return values
string —getProtocolVersion()
Return the EAS version this object supports.
    public
                    getProtocolVersion() : float
    
    
    
        Return values
float —A Horde_ActiveSync::VERSION_* constant.
getSupported()
Get the list of non-ghosted properties for this message.
    public
                    getSupported() : array<string|int, mixed>
    
    
    
        Return values
array<string|int, mixed> —The array of non-ghosted properties
isEmpty()
Returns whether or not this message actually contains any data to send.
    public
                    isEmpty() : bool
    
    
    
    Tags
Return values
bool —True if message is empty, otherwise false.
isGhosted()
Determines if the property specified has been ghosted by the client.
    public
                    isGhosted(string $property) : bool
        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
- $property : string
- 
                    The property to check 
Return values
bool —propertyExists()
Check the existence of a property in this message.
    public
                    propertyExists(string $property) : bool
    
        Parameters
- $property : string
- 
                    The property name 
Return values
bool —setSupported()
Set the list of non-ghosted fields for this message.
    public
                    setSupported(array<string|int, mixed> $fields) : mixed
    
        Parameters
- $fields : array<string|int, mixed>
- 
                    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. 
Return values
mixed —_checkEncoding()
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.
    protected
                    _checkEncoding(mixed $data, string $tag) : mixed
    
        Parameters
- $data : mixed
- 
                    The data to check. A string or stream resource. 
- $tag : string
- 
                    The tag we are outputing. 
Return values
mixed —The encoded data. A string or stream resource with a filter attached.
_checkSendEmpty()
Check if a field should be sent to the device even if it is empty.
    protected
                    _checkSendEmpty(string $tag) : bool
    
        Parameters
- $tag : string
- 
                    The field tag. 
Return values
bool —_formatDate()
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.
    protected
                    _formatDate(Horde_Date $dt, int $type) : string
        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
- $dt : Horde_Date
- 
                    The Horde_Date object to format (should normally be in local tz). 
- $type : int
- 
                    The type to format as: One of TYPE_DATE or TYPE_DATE_DASHES, TYPE_DATE_LOCAL 
Tags
Return values
string —The formatted date
_getAttribute()
Helper method to allow default values for unset properties.
    protected
                    _getAttribute(string $name[, stting $default = null ]) : mixed
    
        Parameters
- $name : string
- 
                    The property name 
- $default : stting = null
- 
                    The default value to return if $property is empty 
Return values
mixed —_parseDate()
Get a Horde_Date from a timestamp, ensuring it's in the correct format.
    protected
                    _parseDate(string $ts) : Horde_Date|bool
        Used when decoding an incoming date value from the client.
Parameters
- $ts : string
- 
                    The timestamp 
Return values
Horde_Date|bool —The Horde_Date or false if unable to decode.
_preEncodeValidation()
Give concrete classes the chance to enforce rules before encoding messages to send to the client.
    protected
                    _preEncodeValidation() : bool
    
    
    
    Tags
Return values
bool —True if values were valid (or could be made valid). False if values are unable to be validated.
_validateDecodedValues()
Give concrete classes the chance to enforce rules.
    protected
                    _validateDecodedValues() : bool
    
    
    
    Tags
Return values
bool —True on success, otherwise false.
_hex2bin()
Function which converts a hex entryid to a binary entryid.
    private
            static        _hex2bin(string $data) : string
    
        Parameters
- $data : string
- 
                    The hexadecimal string 
Return values
string —The binary data