PHP Класс Horde_Core_ActiveSync_Mail, horde

Wraps functionality related to sending/replying/forwarding email from EAS clients.
Автор: Michael J Rubinsky ([email protected])
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$_forward boolean Flag indicating a SMARTFORWARD request.
$_forwardees array Array of email addresses to forward message to, if using SMART_FORWARD.
$_headers Horde_Mime_Header The headers used when sending the email.
$_id integer The UID of the source email for any SMARTREPLY or SMARTFORWARD requests.
$_imap Horde_ActiveSync_Imap_Adapter The imap adapter needed to fetch the source IMAP message if needed.
$_imapMessage Horde_ActiveSync_Imap_Message The message object representing the source email for a SMART[REPLY|FORWARD] request.
$_mailer Horde_Mime_Mail Used to fetch the raw message used to save to sent mail folder.
$_parentFolder string The email folder that contains the source email for any SMARTREPLY or SMARTFORWARD requests.
$_raw Horde_ActiveSync_Rfc822 The raw message body sent from the EAS client.
$_replacemime boolean Flag indicating the client requested to replace the MIME part a SMARTREPLY or SMARTFORWARD request.
$_reply boolean Flag indicating a SMARTREPLY request.
$_replyTop boolean Flag to indicate reply position for SMARTREPLY requests.
$_user string The current EAS user.
$_version string EAS version in use.

Открытые методы

Метод Описание
__construct ( Horde_ActiveSync_Imap_Adapter $imap, string $user, integer $eas_version ) Const'r
__get ( $property )
__set ( $property, $value )
getSentMail ( ) : stream Get the raw message suitable for saving to the sent email folder.
html2text ( $msg )
send ( ) Send the email.
setForward ( string $parent, integer $id, array $params = [] ) Set this as a SMARTFORWARD requests.
setRawMessage ( Horde_ActiveSync_Rfc822 $raw ) Set the raw message content received from the EAS client to send.
setReply ( string $parent, integer $id ) Set this as a SMARTREPLY requests.
text2html ( string $msg ) : string Shortcut function to convert text -> HTML.

Защищенные методы

Метод Описание
_callPreSendHook ( )
_forwardText ( array $body_data, Horde_Mime_Part $part, boolean $html = false ) : string Return the body of the forwarded message in the appropriate type.
_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
_getIdentityFromAddress ( ) : string Return the current user's From address.
_getImapMessage ( ) Fetch the source message for a SMART request from the IMAP server.
_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
_getReplyToAddress ( ) : string Return the current user's ReplyTo address, if available.
_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.
_replyText ( array $body_data, Horde_Mime_Part $part, boolean $html = false ) : string Return the body of the replied message in the appropriate type.
_sendRaw ( ) Send the raw message received from the client. E.g., NOT a SMART request.
_sendSmart ( ) Sends a SMART response.
_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.

Описание методов

__construct() публичный Метод

Const'r
public __construct ( Horde_ActiveSync_Imap_Adapter $imap, string $user, integer $eas_version )
$imap Horde_ActiveSync_Imap_Adapter The IMAP adapter.
$user string EAS user.
$eas_version integer EAS version in use.

__get() публичный Метод

public __get ( $property )

__set() публичный Метод

public __set ( $property, $value )

_callPreSendHook() защищенный Метод

protected _callPreSendHook ( )

_forwardText() защищенный Метод

Return the body of the forwarded message in the appropriate type.
protected _forwardText ( array $body_data, Horde_Mime_Part $part, boolean $html = false ) : string
$body_data array The body data array of the source msg.
$part Horde_Mime_Part The body part of the email to send.
$html boolean Is this an html part?
Результат string The propertly formatted forwarded body text.

_getHtmlPart() защищенный Метод

Build the HTML part of a SMARTREPLY or SMARTFORWARD
protected _getHtmlPart ( string $html_id, Horde_Mime_Part $mime_message, array $body_data, Horde_Mime_Part $base_part ) : string
$html_id string The MIME part id of the html part of $base_part.
$mime_message Horde_Mime_Part The MIME part of the email to be sent.
$body_data array @see Horde_ActiveSync_Imap_Message::getMessageBodyData()
$base_part Horde_Mime_Part The base MIME part of the source message for a SMART request.
Результат string The plaintext part of the email message that is being sent.

_getIdentityFromAddress() защищенный Метод

Return the current user's From address.
protected _getIdentityFromAddress ( ) : string
Результат string A RFC822 valid email string.

_getImapMessage() защищенный Метод

Fetch the source message for a SMART request from the IMAP server.
protected _getImapMessage ( )

_getPlainPart() защищенный Метод

Build the text part of a SMARTREPLY or SMARTFORWARD
protected _getPlainPart ( string $plain_id, Horde_Mime_Part $mime_message, array $body_data, Horde_Mime_Part $base_part ) : string
$plain_id string The MIME part id of the plaintext part of $base_part.
$mime_message Horde_Mime_Part The MIME part of the email to be sent.
$body_data array @see Horde_ActiveSync_Imap_Message::getMessageBodyData()
$base_part Horde_Mime_Part The base MIME part of the source message for a SMART request.
Результат string The plaintext part of the email message that is being sent.

_getReplyToAddress() защищенный Метод

Return the current user's ReplyTo address, if available.
protected _getReplyToAddress ( ) : string
Результат string A RFC822 valid email string.

_msgBody() защищенный Метод

Return the body text of the original email from a smart request.
protected _msgBody ( array $body_data, Horde_Mime_Part $part, boolean $html, boolean $flow = false ) : string
$body_data array The body data array of the source msg.
$part Horde_Mime_Part The body mime part of the email to send.
$html boolean Do we want an html body?
$flow boolean Should the body be flowed?
Результат string The properly formatted/flowed message body.

_replyText() защищенный Метод

Return the body of the replied message in the appropriate type.
protected _replyText ( array $body_data, Horde_Mime_Part $part, boolean $html = false ) : string
$body_data array The body data array of the source msg.
$part Horde_Mime_Part
$html boolean Is this an html part?
Результат string The propertly formatted replied body text.

_sendRaw() защищенный Метод

Send the raw message received from the client. E.g., NOT a SMART request.
protected _sendRaw ( )

_sendSmart() защищенный Метод

Sends a SMART response.
protected _sendSmart ( )

_tryWithoutBinary() защищенный Метод

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.
protected _tryWithoutBinary ( $recipients, array $headers ) : boolean
$headers array
Результат boolean

getSentMail() публичный Метод

Get the raw message suitable for saving to the sent email folder.
public getSentMail ( ) : stream
Результат stream A stream contianing the raw message.

html2text() публичный статический Метод

public static html2text ( $msg )

send() публичный Метод

Send the email.
public send ( )

setForward() публичный Метод

Set this as a SMARTFORWARD requests.
public setForward ( string $parent, integer $id, array $params = [] )
$parent string The folder containing the source message.
$id integer The source message UID.
$params array 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.

setRawMessage() публичный Метод

Set the raw message content received from the EAS client to send.
public setRawMessage ( Horde_ActiveSync_Rfc822 $raw )
$raw Horde_ActiveSync_Rfc822 The data from the EAS client.

setReply() публичный Метод

Set this as a SMARTREPLY requests.
public setReply ( string $parent, integer $id )
$parent string The folder containing the source message.
$id integer The source message UID.

text2html() публичный статический Метод

Shortcut function to convert text -> HTML.
public static text2html ( string $msg ) : string
$msg string The message text.
Результат string HTML text.

Описание свойств

$_forward защищенное свойство

Flag indicating a SMARTFORWARD request.
protected bool $_forward
Результат boolean

$_forwardees защищенное свойство

Array of email addresses to forward message to, if using SMART_FORWARD.
С версии: 2.31.0
protected array $_forwardees
Результат array

$_headers защищенное свойство

The headers used when sending the email.
protected Horde_Mime_Header $_headers
Результат Horde_Mime_Header

$_id защищенное свойство

The UID of the source email for any SMARTREPLY or SMARTFORWARD requests.
protected int $_id
Результат integer

$_imap защищенное свойство

The imap adapter needed to fetch the source IMAP message if needed.
protected Horde_ActiveSync_Imap_Adapter $_imap
Результат Horde_ActiveSync_Imap_Adapter

$_imapMessage защищенное свойство

The message object representing the source email for a SMART[REPLY|FORWARD] request.
protected Horde_ActiveSync_Imap_Message $_imapMessage
Результат Horde_ActiveSync_Imap_Message

$_mailer защищенное свойство

Used to fetch the raw message used to save to sent mail folder.
protected Horde_Mime_Mail $_mailer
Результат Horde_Mime_Mail

$_parentFolder защищенное свойство

The email folder that contains the source email for any SMARTREPLY or SMARTFORWARD requests.
protected string $_parentFolder
Результат string

$_raw защищенное свойство

The raw message body sent from the EAS client.
protected Horde_ActiveSync_Rfc822 $_raw
Результат Horde_ActiveSync_Rfc822

$_replacemime защищенное свойство

Flag indicating the client requested to replace the MIME part a SMARTREPLY or SMARTFORWARD request.
protected bool $_replacemime
Результат boolean

$_reply защищенное свойство

Flag indicating a SMARTREPLY request.
protected bool $_reply
Результат boolean

$_replyTop защищенное свойство

Flag to indicate reply position for SMARTREPLY requests.
protected bool $_replyTop
Результат boolean

$_user защищенное свойство

The current EAS user.
protected string $_user
Результат string

$_version защищенное свойство

EAS version in use.
protected string $_version
Результат string