Constants

HTML_BLOCKQUOTE

HTML_BLOCKQUOTE

Properties

$replacemime

$replacemime : boolean

Flag to indicate we are to replace the MIME contents of a SMART request.

Type

boolean

$imapAdapter

$imapAdapter : \Horde_ActiveSync_Imap_Adapter

The imap adapter.

Type

\Horde_ActiveSync_Imap_Adapter

$id

$id : integer

The UID of the source email for any SMARTREPLY or SMARTFORWARD requests.

Type

integer

$reply

$reply : boolean

Flag indicating a SMARTREPLY request.

Type

boolean

$forward

$forward : boolean

Flag indicating a SMARTFORWARD request.

Type

boolean

$header

$header : \Horde_Mime_Header

The headers used when sending the email.

Type

\Horde_Mime_Header

$parentFolder

$parentFolder : string

he email folder that contains the source email for any SMARTREPLY or SMARTFORWARD requests.

Type

string

$_headers

$_headers : \Horde_Mime_Header

The headers used when sending the email.

Type

\Horde_Mime_Header

$_raw

$_raw : \Horde_ActiveSync_Rfc822

The raw message body sent from the EAS client.

Type

\Horde_ActiveSync_Rfc822

$_parentFolder

$_parentFolder : string

The email folder that contains the source email for any SMARTREPLY or SMARTFORWARD requests.

Type

string

$_id

$_id : integer

The UID of the source email for any SMARTREPLY or SMARTFORWARD requests.

Type

integer

$_forward

$_forward : boolean

Flag indicating a SMARTFORWARD request.

Type

boolean

$_reply

$_reply : boolean

Flag indicating a SMARTREPLY request.

Type

boolean

$_replacemime

$_replacemime : boolean

Flag indicating the client requested to replace the MIME part a SMARTREPLY or SMARTFORWARD request.

Type

boolean

$_user

$_user : string

The current EAS user.

Type

string

$_replyTop

$_replyTop : boolean

Flag to indicate reply position for SMARTREPLY requests.

Type

boolean

$_mailer

$_mailer : \Horde_Mime_Mail

Internal cache of the mailer used when sending SMART[REPLY|FORWARD].

Used to fetch the raw message used to save to sent mail folder.

Type

\Horde_Mime_Mail

$_imapMessage

$_imapMessage : \Horde_ActiveSync_Imap_Message

The message object representing the source email for a SMART[REPLY|FORWARD] request.

Type

\Horde_ActiveSync_Imap_Message

$_imap

$_imap : \Horde_ActiveSync_Imap_Adapter

The imap adapter needed to fetch the source IMAP message if needed.

Type

\Horde_ActiveSync_Imap_Adapter

$_version

$_version : string

EAS version in use.

Type

string

$_forwardees

$_forwardees : array

Array of email addresses to forward message to, if using SMART_FORWARD.

Type

array

Methods

__construct()

__construct(\Horde_ActiveSync_Imap_Adapter  $imap, string  $user, integer  $eas_version) 

Const'r

Parameters

\Horde_ActiveSync_Imap_Adapter $imap

The IMAP adapter.

string $user

EAS user.

integer $eas_version

EAS version in use.

__get()

__get(  $property) 

Parameters

$property

__set()

__set(  $property,   $value) 

Parameters

$property
$value

setRawMessage()

setRawMessage(\Horde_ActiveSync_Rfc822  $raw) 

Set the raw message content received from the EAS client to send.

Parameters

\Horde_ActiveSync_Rfc822 $raw

The data from the EAS client.

setForward()

setForward(string  $parent, integer  $id, array  $params = array()) 

Set this as a SMARTFORWARD requests.

Parameters

string $parent

The folder containing the source message.

integer $id

The source message UID.

array $params

Additional parameters: @since 2.31.0

  • forwardees: An array of email addresses that this message will be forwarded to. DEFAULT: Recipients are taken from raw message.

Throws

\Horde_ActiveSync_Exception

setReply()

setReply(string  $parent, integer  $id) 

Set this as a SMARTREPLY requests.

Parameters

string $parent

The folder containing the source message.

integer $id

The source message UID.

Throws

\Horde_ActiveSync_Exception

send()

send() 

Send the email.

Throws

\Horde_ActiveSync_Exception

getSentMail()

getSentMail() : \stream

Get the raw message suitable for saving to the sent email folder.

Returns

\stream —

A stream contianing the raw message.

text2html()

text2html(string  $msg) : string

Shortcut function to convert text -> HTML.

Parameters

string $msg

The message text.

Returns

string —

HTML text.

html2text()

html2text(  $msg) 

Parameters

$msg

_callPreSendHook()

_callPreSendHook() 

_sendRaw()

_sendRaw() 

Send the raw message received from the client. E.g., NOT a SMART request.

Throws

\Horde_ActiveSync_Exception

_tryWithoutBinary()

_tryWithoutBinary(  $recipients, array  $headers) : boolean

Some clients (HTC One devices, for one) generate HTML signatures that contain line lengths too long for servers without BINARYMIME to send. If we are here, see if that's the reason by checking content encoding and trying again.

Parameters

$recipients
array $headers

Returns

boolean

_sendSmart()

_sendSmart() 

Sends a SMART response.

Throws

\Horde_ActiveSync_Exception

_getPlainPart()

_getPlainPart(string  $plain_id, \Horde_Mime_Part  $mime_message, array  $body_data, \Horde_Mime_Part  $base_part) : string

Build the text part of a SMARTREPLY or SMARTFORWARD

Parameters

string $plain_id

The MIME part id of the plaintext part of $base_part.

\Horde_Mime_Part $mime_message

The MIME part of the email to be sent.

array $body_data

@see Horde_ActiveSync_Imap_Message::getMessageBodyData()

\Horde_Mime_Part $base_part

The base MIME part of the source message for a SMART request.

Returns

string —

The plaintext part of the email message that is being sent.

_getHtmlPart()

_getHtmlPart(string  $html_id, \Horde_Mime_Part  $mime_message, array  $body_data, \Horde_Mime_Part  $base_part) : string

Build the HTML part of a SMARTREPLY or SMARTFORWARD

Parameters

string $html_id

The MIME part id of the html part of $base_part.

\Horde_Mime_Part $mime_message

The MIME part of the email to be sent.

array $body_data

@see Horde_ActiveSync_Imap_Message::getMessageBodyData()

\Horde_Mime_Part $base_part

The base MIME part of the source message for a SMART request.

Returns

string —

The plaintext part of the email message that is being sent.

_getImapMessage()

_getImapMessage() 

Fetch the source message for a SMART request from the IMAP server.

Throws

\Horde_Exception_NotFound

_getIdentityFromAddress()

_getIdentityFromAddress() : string

Return the current user's From address.

Returns

string —

A RFC822 valid email string.

_getReplyToAddress()

_getReplyToAddress() : string

Return the current user's ReplyTo address, if available.

Returns

string —

A RFC822 valid email string.

_forwardText()

_forwardText(array  $body_data, \Horde_Mime_Part  $part, boolean  $html = false) : string

Return the body of the forwarded message in the appropriate type.

Parameters

array $body_data

The body data array of the source msg.

\Horde_Mime_Part $part

The body part of the email to send.

boolean $html

Is this an html part?

Returns

string —

The propertly formatted forwarded body text.

_replyText()

_replyText(array  $body_data, \Horde_Mime_Part  $part, boolean  $html = false) : string

Return the body of the replied message in the appropriate type.

Parameters

array $body_data

The body data array of the source msg.

\Horde_Mime_Part $part
boolean $html

Is this an html part?

Returns

string —

The propertly formatted replied body text.

_msgBody()

_msgBody(array  $body_data, \Horde_Mime_Part  $part, boolean  $html, boolean  $flow = false) : string

Return the body text of the original email from a smart request.

Parameters

array $body_data

The body data array of the source msg.

\Horde_Mime_Part $part

The body mime part of the email to send.

boolean $html

Do we want an html body?

boolean $flow

Should the body be flowed?

Returns

string —

The properly formatted/flowed message body.

_tidyHtml()

_tidyHtml(string  $html) : string

Attempt to sanitize the provided $html string.

Uitilizes the Cleanhtml filter if able, otherwise uses Horde_Dom

Parameters

string $html

An HTML string to sanitize.

Returns

string —

The sanitized HTML.