PHP Класс IMP_Compose, horde

Автор: Michael Slusarz ([email protected])
Наследование: implements ArrayAccess, implements Countable, implements IteratorAggregate
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$atcId integer Attachment ID counter.
$changed string Either empty, 'changed', or 'deleted'.
$charset string The charset to use for sending.

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

Свойство Тип Описание
$_atc array Attachment data.
$_cacheid string The cache ID used to store object in session.
$_metadata array Various metadata for this message.
$_replytype integer The reply type.

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

Метод Описание
__construct ( string $cacheid ) Constructor.
__toString ( ) String representation: the cache ID.
__wakeup ( ) Tasks to do upon unserialize().
_getMessageTextCallback ( $id, $attribute, $node ) : string Callback used in _getMessageText().
_saveRecipients ( Horde_Mail_Rfc822_List $recipients ) Save the recipients done in a sendMessage().
addAttachmentFromPart ( Horde_Mime_Part $part ) : IMP_Compose_Attachment Adds an attachment from Horde_Mime_Part data.
addAttachmentFromUpload ( string $field ) : array Add attachment from uploaded (form) data.
addRelatedAttachment ( IMP_Compose_Attachment $atc_ob, DOMElement $node, string $attribute ) Add an attachment referred to in a related part.
additionalAttachmentsAllowed ( ) : mixed How many more attachments are allowed?
attachImapMessage ( IMP_Indices $indices ) : string Add mail message(s) from the mail server as a message/rfc822 attachment.
buildAndSendMessage ( string $body, array $header, IMP_Prefs_Identity $identity, array $opts = [] ) Builds and sends a MIME message.
canCompose ( ) : boolean Is composing messages allowed?
canHtmlCompose ( ) : boolean Is the HTML editor available for compostion?
canUploadAttachment ( ) : boolean Can attachments be uploaded?
count ( ) : integer Returns the number of attachments currently in this message.
deleteAllAttachments ( ) Deletes all attachments.
destroy ( string $action ) Destroys an IMP_Compose instance.
editAsNew ( IMP_Indices $indices, array $opts = [] ) : mixed Edits a message as new.
editTemplate ( IMP_Indices $indices ) : mixed Edit an existing template message. Saving this template later (using saveTemplate()) will cause the original message to be deleted.
forwardMessage ( integer $type, IMP_Contents $contents, boolean $attach = true, array $opts = [] ) : array Determine the text and headers for a forwarded message.
forwardMessageText ( IMP_Contents $contents, array $opts = [] ) : array Returns the forward text for a message.
forwardMultipleMessages ( IMP_Indices $indices ) : array Prepares a forwarded message using multiple messages.
getCacheId ( ) : string Obtains the cache ID for the session object.
getContentsOb ( ) : mixed If this object contains sufficient metadata, return an IMP_Contents object reflecting that metadata.
getHmac ( string $cacheid = null, string $user = null ) : string Generate HMAC hash used to validate data on a session expiration. Uses the unique compose cache ID of the expired message, the username, and the secret key of the server to generate a reproducible value that can be validated if session data doesn't exist.
getIterator ( )
getMetadata ( string $name ) : mixed Gets metadata about the current object.
hasDrafts ( ) : boolean Does this message have any drafts associated with it?
maxAttachmentSize ( ) : integer What is the maximum attachment size?
offsetExists ( $offset ) * ArrayAccess methods.
offsetGet ( $offset )
offsetSet ( $offset, $value )
offsetUnset ( $offset )
recipientList ( array $hdr ) : array Cleans up and returns the recipient list. Method designed to parse user entered data; does not encode/validate addresses.
recoverSessionExpireDraft ( ) Restore session expiration draft compose data.
redirectMessage ( IMP_Indices $indices ) Prepare a redirect message.
replyMessage ( integer $type, IMP_Contents $contents, array $opts = [] ) : array Determines the reply text and headers for a message.
replyMessageText ( IMP_Contents $contents, array $opts = [] ) : array Returns the reply text for a message.
replyType ( boolean $base = false ) : string Return the reply type.
resumeDraft ( IMP_Indices $indices, array $opts = [] ) : mixed Resumes a previously saved draft message.
saveDraft ( array $headers, mixed $message, array $opts = [] ) : string Saves a draft message.
saveTemplate ( array $headers, mixed $message, array $opts = [] ) : string Save a template message on the IMAP server.
sendMessage ( Horde_Mail_Rfc822_List $email, Horde_Mime_Headers $headers, Horde_Mime_Part $message ) Sends a message.
sendRedirectMessage ( mixed $to, boolean $log = true ) : array Send a redirect (a/k/a resent) message. See RFC 5322 [3.6.6].
sessionExpireDraft ( Horde_Variables $vars ) Store draft compose data if session expires.
text2html ( string $msg ) : string Shortcut function to convert text -> HTML for purposes of composition.
useTemplate ( IMP_Indices $indices, array $opts = [] ) : mixed Uses a template to create a message.

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

Метод Описание
_addAttachment ( string $atc_file, integer $bytes, string $filename, string $type ) : IMP_Compose_Attachment Adds an attachment to the outgoing compose message.
_cleanHtmlOutput ( Horde_Domhtml $html ) Clean outgoing HTML (remove unexpected data URLs).
_convertToRelated ( Horde_Domhtml $html, Horde_Mime_Part $part ) : Horde_Mime_Part Converts an HTML part to a multipart/related part, if necessary.
_createMimeMessage ( string $body, array $options = [] ) : Horde_Mime_Part Create the base Horde_Mime_Part for sending.
_encryptMessage ( Horde_Mime_Part $msg, integer $encrypt, Horde_Mail_Rfc822_List $recip, Horde_Mail_Rfc822_Address $from ) : Horde_Mime_Part Encrypt an outgoing message.
_getMatchingIdentity ( Horde_Mime_Headers $h, array $only = [] ) : integer Get "tieto" identity information.
_getMessageText ( IMP_Contents $contents, array $options = [] ) : mixed Regenerates body text for use in the compose screen from IMAP data.
_getMsgHeaders ( Horde_Mime_Headers $h ) : string Determine the header information to display in the forward/reply.
_linkAttachments ( &$body, mixed $html ) Adds linked attachments to message.
_logSentmail ( Horde_Mime_Headers $headers, Horde_Mail_Rfc822_List $recip, boolean $success ) : string Log a sent action to the sentmail backend.
_msgTextFormat ( array $opts, string $pref_name ) : array Determine text editor format.
_prepSendMessage ( Horde_Mail_Rfc822_List $email, Horde_Mime_Part $message = null ) : string Sanity checking/MIME formatting before sending a message.
_prepSendMessageAssert ( Horde_Mail_Rfc822_List $email ) Recipiet checks to do if this is a user-generated compose message.
_prepSendMessageEncode ( Horde_Mail_Rfc822_List $email, string $charset ) : string Encode address and do sanity checking on encoded address.
_prepareHeaders ( array $headers, array $opts = [] ) : Horde_Mime_Headers Prepare header object with basic header fields and converts headers to the current compose charset.
_resumeDraft ( IMP_Indices $indices, integer $type, array $opts ) : mixed Resumes a previously saved draft message.
_saveDraftMsg ( array $headers, mixed $message, array $opts ) : string Prepare the draft message.
_saveDraftServer ( string $data ) : string Save a draft message on the IMAP server.
_saveToSentMail ( Horde_Mime_Headers $headers, Horde_Mime_Part $save_msg, Horde_Mail_Rfc822_List $recips, array $opts ) Save message to sent-mail mailbox, if configured to do so.
_setMetadata ( string $name, mixed $value ) Sets metadata for the current object.

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

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

Constructor.
public __construct ( string $cacheid )
$cacheid string The cache ID string.

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

String representation: the cache ID.
public __toString ( )

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

Tasks to do upon unserialize().
public __wakeup ( )

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

Adds an attachment to the outgoing compose message.
protected _addAttachment ( string $atc_file, integer $bytes, string $filename, string $type ) : IMP_Compose_Attachment
$atc_file string Temporary file containing attachment contents.
$bytes integer Size of data, in bytes.
$filename string Filename of data.
$type string MIME type of data.
Результат IMP_Compose_Attachment Attachment object.

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

Clean outgoing HTML (remove unexpected data URLs).
protected _cleanHtmlOutput ( Horde_Domhtml $html )
$html Horde_Domhtml The HTML data.

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

Converts an HTML part to a multipart/related part, if necessary.
protected _convertToRelated ( Horde_Domhtml $html, Horde_Mime_Part $part ) : Horde_Mime_Part
$html Horde_Domhtml HTML data.
$part Horde_Mime_Part The HTML part.
Результат Horde_Mime_Part The part to add to the compose output.

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

Create the base Horde_Mime_Part for sending.
protected _createMimeMessage ( string $body, array $options = [] ) : Horde_Mime_Part
$body string Message body.
$options array Additional options: - html: (boolean) Is this a HTML message? - identity: (IMP_Prefs_Identity) Identity of the sender. - nofinal: (boolean) This is not a message which will be sent out. - noattach: (boolean) Don't add attachment information. - pgp_attach_pubkey: (boolean) Attach the user's PGP public key? - recip: (Horde_Mail_Rfc822_List) The recipient list. - signature: (IMP_Prefs_Identity|string) If set, add the signature to the message. - vcard_attach: (string) If set, attach user's vcard to message.
Результат Horde_Mime_Part The base MIME part.

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

Encrypt an outgoing message.
protected _encryptMessage ( Horde_Mime_Part $msg, integer $encrypt, Horde_Mail_Rfc822_List $recip, Horde_Mail_Rfc822_Address $from ) : Horde_Mime_Part
$msg Horde_Mime_Part Outgoing message.
$encrypt integer Encryption type.
$recip Horde_Mail_Rfc822_List Recipient list.
$from Horde_Mail_Rfc822_Address Sending address.
Результат Horde_Mime_Part $msg Processed outgoing message.

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

Get "tieto" identity information.
protected _getMatchingIdentity ( Horde_Mime_Headers $h, array $only = [] ) : integer
$h Horde_Mime_Headers The headers object for the message.
$only array Only use these headers.
Результат integer The matching identity. If no exact match, returns the default identity.

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

Regenerates body text for use in the compose screen from IMAP data.
protected _getMessageText ( IMP_Contents $contents, array $options = [] ) : mixed
$contents IMP_Contents An IMP_Contents object.
$options array Additional options:
  • html: (boolean) Return text/html part, if available.
  • imp_msg: (integer) If non-empty, the message data was created by IMP. Either:
    • self::COMPOSE
    • self::FORWARD
    • self::REPLY
  • replylimit: (boolean) Enforce length limits?
  • toflowed: (boolean) Do flowed conversion?
Результат mixed Null if bodypart not found, or array with the following keys: - charset: (string) The guessed charset to use. - flowed: (Horde_Text_Flowed) A flowed object, if the text is flowed. Otherwise, null. - id: (string) The MIME ID of the bodypart. - mode: (string) Either 'text' or 'html'. - text: (string) The body text.

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

Callback used in _getMessageText().
public _getMessageTextCallback ( $id, $attribute, $node ) : string
Результат string Replacement text.

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

Determine the header information to display in the forward/reply.
protected _getMsgHeaders ( Horde_Mime_Headers $h ) : string
$h Horde_Mime_Headers The headers object for the message.
Результат string The header information for the original message.

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

Adds linked attachments to message.
protected _linkAttachments ( &$body, mixed $html )
$html mixed HTML data (Horde_Domhtml) or null.

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

Log a sent action to the sentmail backend.
protected _logSentmail ( Horde_Mime_Headers $headers, Horde_Mail_Rfc822_List $recip, boolean $success ) : string
$headers Horde_Mime_Headers Message headers.
$recip Horde_Mail_Rfc822_List Message recipients.
$success boolean Send success.
Результат string Message-ID value.

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

Determine text editor format.
protected _msgTextFormat ( array $opts, string $pref_name ) : array
$opts array Options (contains 'format' param).
$pref_name string The pref name that controls formatting.
Результат array Use HTML? and Force HTML?

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

Sanity checking/MIME formatting before sending a message.
protected _prepSendMessage ( Horde_Mail_Rfc822_List $email, Horde_Mime_Part $message = null ) : string
$email Horde_Mail_Rfc822_List The e-mail list to send to.
$message Horde_Mime_Part The object that contains the text to send.
Результат string The encoded $email list.

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

Recipiet checks to do if this is a user-generated compose message.
protected _prepSendMessageAssert ( Horde_Mail_Rfc822_List $email )
$email Horde_Mail_Rfc822_List The e-mail list to send to.

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

Encode address and do sanity checking on encoded address.
protected _prepSendMessageEncode ( Horde_Mail_Rfc822_List $email, string $charset ) : string
$email Horde_Mail_Rfc822_List The e-mail list to send to.
$charset string The charset to encode to.
Результат string The encoded $email list.

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

Prepare header object with basic header fields and converts headers to the current compose charset.
protected _prepareHeaders ( array $headers, array $opts = [] ) : Horde_Mime_Headers
$headers array Array with 'from', 'to', 'cc', 'bcc', and 'subject' values.
$opts array An array of options w/the following keys: - priority: (string) The message priority ('high', 'normal', 'low').
Результат Horde_Mime_Headers Headers object with the appropriate headers set.

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

Resumes a previously saved draft message.
protected _resumeDraft ( IMP_Indices $indices, integer $type, array $opts ) : mixed
$indices IMP_Indices See resumeDraft().
$type integer Compose type.
$opts array Additional options: - format: (string) Force to this format. DEFAULT: Auto-determine.
Результат mixed See resumeDraft().

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

Prepare the draft message.
protected _saveDraftMsg ( array $headers, mixed $message, array $opts ) : string
$headers array List of message headers.
$message mixed Either the message text (string) or a Horde_Mime_Part object that contains the text to send.
$opts array An array of options w/the following keys: - html: (boolean) Is this an HTML message? - priority: (string) The message priority ('high', 'normal', 'low'). - readreceipt: (boolean) Add return receipt headers? - verify_email: (boolean) Verify e-mail messages? Default: no.
Результат string The body text.

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

Save a draft message on the IMAP server.
protected _saveDraftServer ( string $data ) : string
$data string The text of the draft message.
Результат string Status string (not HTML escaped).

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

Save the recipients done in a sendMessage().
public _saveRecipients ( Horde_Mail_Rfc822_List $recipients )
$recipients Horde_Mail_Rfc822_List The list of recipients.

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

Save message to sent-mail mailbox, if configured to do so.
protected _saveToSentMail ( Horde_Mime_Headers $headers, Horde_Mime_Part $save_msg, Horde_Mail_Rfc822_List $recips, array $opts )
$headers Horde_Mime_Headers Headers object.
$save_msg Horde_Mime_Part Message data to save.
$recips Horde_Mail_Rfc822_List Recipient list.
$opts array See buildAndSendMessage()

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

Sets metadata for the current object.
protected _setMetadata ( string $name, mixed $value )
$name string The metadata name.
$value mixed The metadata value.

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

Adds an attachment from Horde_Mime_Part data.
public addAttachmentFromPart ( Horde_Mime_Part $part ) : IMP_Compose_Attachment
$part Horde_Mime_Part The object that contains the attachment data.
Результат IMP_Compose_Attachment Attachment object.

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

Add attachment from uploaded (form) data.
public addAttachmentFromUpload ( string $field ) : array
$field string The form field name.
Результат array A list of IMP_Compose_Attachment objects (if successfully attached) or IMP_Compose_Exception objects (if error when attaching).

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

Add an attachment referred to in a related part.
public addRelatedAttachment ( IMP_Compose_Attachment $atc_ob, DOMElement $node, string $attribute )
$atc_ob IMP_Compose_Attachment
$node DOMElement Node element containg the related reference.
$attribute string Element attribute containing the related reference.

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

How many more attachments are allowed?
public additionalAttachmentsAllowed ( ) : mixed
Результат mixed Returns true if no attachment limit. Else returns the number of additional attachments allowed.

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

Add mail message(s) from the mail server as a message/rfc822 attachment.
public attachImapMessage ( IMP_Indices $indices ) : string
$indices IMP_Indices An indices object.
Результат string Subject string.

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

Builds and sends a MIME message.
public buildAndSendMessage ( string $body, array $header, IMP_Prefs_Identity $identity, array $opts = [] )
$body string The message body.
$header array List of message headers.
$identity IMP_Prefs_Identity The Identity object for the sender of this message.
$opts array An array of options w/the following keys: - encrypt: (integer) A flag whether to encrypt or sign the message. One of: - IMP_Pgp::ENCRYPT - IMP_Pgp::SIGNENC - IMP_Smime::ENCRYPT - IMP_Smime::SIGNENC - html: (boolean) Whether this is an HTML message. DEFAULT: false - pgp_attach_pubkey: (boolean) Attach the user's PGP public key to the message? - priority: (string) The message priority ('high', 'normal', 'low'). - save_sent: (boolean) Save sent mail? - sent_mail: (IMP_Mailbox) The sent-mail mailbox (UTF-8). - strip_attachments: (bool) Strip attachments from the message? - signature: (string) The message signature. - readreceipt: (boolean) Add return receipt headers? - useragent: (string) The User-Agent string to use. - vcard_attach: (string) Attach the user's vCard (value is name to display as vcard filename).

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

Is composing messages allowed?
public static canCompose ( ) : boolean
Результат boolean True if compose allowed.

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

Is the HTML editor available for compostion?
public static canHtmlCompose ( ) : boolean
Результат boolean True if HTML editor is available.

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

Can attachments be uploaded?
public static canUploadAttachment ( ) : boolean
Результат boolean True if attachments can be uploaded.

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

Returns the number of attachments currently in this message.
public count ( ) : integer
Результат integer The number of attachments in this message.

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

Deletes all attachments.

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

Destroys an IMP_Compose instance.
public destroy ( string $action )
$action string The action performed to cause the end of this instance. Either 'cancel', 'discard', 'save_draft', or 'send'.

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

Edits a message as new.
public editAsNew ( IMP_Indices $indices, array $opts = [] ) : mixed
$indices IMP_Indices An indices object.
$opts array Additional options: - format: (string) Force to this format. DEFAULT: Auto-determine.
Результат mixed See resumeDraft().

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

Edit an existing template message. Saving this template later (using saveTemplate()) will cause the original message to be deleted.
public editTemplate ( IMP_Indices $indices ) : mixed
$indices IMP_Indices An indices object.
Результат mixed See resumeDraft().

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

Determine the text and headers for a forwarded message.
public forwardMessage ( integer $type, IMP_Contents $contents, boolean $attach = true, array $opts = [] ) : array
$type integer The forward type (self::FORWARD* constant).
$contents IMP_Contents An IMP_Contents object.
$attach boolean Attach the forwarded message?
$opts array Additional options: - format: (string) Force to this format. DEFAULT: Auto-determine.
Результат array An array with the following keys: - attach: (boolean) True if original message was attached. - body: (string) The text of the body part. - format: (string) The format of the body message ('html', 'text'). - identity: (mixed) See IMP_Prefs_Identity#getMatchingIdentity(). - subject: (string) Formatted subject. - title: (string) Title to use on page. - type: (integer) - The compose type.

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

Returns the forward text for a message.
public forwardMessageText ( IMP_Contents $contents, array $opts = [] ) : array
$contents IMP_Contents An IMP_Contents object.
$opts array Additional options: - format: (string) Force to this format. DEFAULT: Auto-determine.
Результат array An array with the following keys: - body: (string) The text of the body part. - charset: (string) The guessed charset to use for the forward. - format: (string) The format of the body message ('html', 'text').

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

Prepares a forwarded message using multiple messages.
public forwardMultipleMessages ( IMP_Indices $indices ) : array
$indices IMP_Indices An indices object containing the indices of the forwarded messages.
Результат array An array with the following keys: - body: (string) The text of the body part. - format: (string) The format of the body message ('html', 'text'). - identity: (mixed) See IMP_Prefs_Identity#getMatchingIdentity(). - subject: (string) Formatted subject. - title: (string) Title to use on page. - type: (integer) The compose type.

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

Obtains the cache ID for the session object.
public getCacheId ( ) : string
Результат string The message cache ID.

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

If this object contains sufficient metadata, return an IMP_Contents object reflecting that metadata.
public getContentsOb ( ) : mixed
Результат mixed Either an IMP_Contents object or null.

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

Generate HMAC hash used to validate data on a session expiration. Uses the unique compose cache ID of the expired message, the username, and the secret key of the server to generate a reproducible value that can be validated if session data doesn't exist.
public getHmac ( string $cacheid = null, string $user = null ) : string
$cacheid string The cache ID to use. If null, uses cache ID of the compose object.
$user string The user ID to use. If null, uses the current authenticated username.
Результат string The HMAC hash string.

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

public getIterator ( )

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

Gets metadata about the current object.
public getMetadata ( string $name ) : mixed
$name string The metadata name.
Результат mixed The metadata value or null if it doesn't exist.

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

Does this message have any drafts associated with it?
public hasDrafts ( ) : boolean
Результат boolean True if draft messages exist.

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

What is the maximum attachment size?
public static maxAttachmentSize ( ) : integer
Результат integer The maximum attachment size (in bytes).

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

* ArrayAccess methods.
public offsetExists ( $offset )

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

public offsetGet ( $offset )

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

public offsetSet ( $offset, $value )

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

public offsetUnset ( $offset )

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

Cleans up and returns the recipient list. Method designed to parse user entered data; does not encode/validate addresses.
public recipientList ( array $hdr ) : array
$hdr array An array of MIME headers and/or address list objects. Recipients will be extracted from the 'to', 'cc', and 'bcc' entries.
Результат array An array with the following entries: - has_input: (boolean) True if at least one of the headers contains user input. - header: (array) Contains the cleaned up 'to', 'cc', and 'bcc' address list (Horde_Mail_Rfc822_List objects). - list: (Horde_Mail_Rfc822_List) Recipient addresses.

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

Restore session expiration draft compose data.

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

Prepare a redirect message.
public redirectMessage ( IMP_Indices $indices )
$indices IMP_Indices An indices object.

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

Determines the reply text and headers for a message.
public replyMessage ( integer $type, IMP_Contents $contents, array $opts = [] ) : array
$type integer The reply type (self::REPLY* constant).
$contents IMP_Contents An IMP_Contents object.
$opts array Additional options: - format: (string) Force to this format. DEFAULT: Auto-determine. - to: (string) The recipient of the reply. Overrides the automatically determined value.
Результат array An array with the following keys: - addr: (array) Address lists (to, cc, bcc; Horde_Mail_Rfc822_List objects). - body: (string) The text of the body part. - format: (string) The format of the body message (html, text). - identity: (integer) The identity to use for the reply based on the original message's addresses. - lang: (array) Language code (keys)/language name (values) of the original sender's preferred language(s). - reply_list_id: (string) List ID label. - reply_recip: (integer) Number of recipients in reply list. - subject: (string) Formatted subject. - type: (integer) The reply type used (either self::REPLY_ALL, self::REPLY_LIST, or self::REPLY_SENDER).

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

Returns the reply text for a message.
public replyMessageText ( IMP_Contents $contents, array $opts = [] ) : array
$contents IMP_Contents An IMP_Contents object.
$opts array Additional options: - format: (string) Force to this format. DEFAULT: Auto-determine.
Результат array An array with the following keys: - body: (string) The text of the body part. - charset: (string) The guessed charset to use for the reply. - format: (string) The format of the body message ('html', 'text').

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

Return the reply type.
public replyType ( boolean $base = false ) : string
$base boolean Return the base reply type?
Результат string The reply type, or null if not a reply.

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

Resumes a previously saved draft message.
public resumeDraft ( IMP_Indices $indices, array $opts = [] ) : mixed
$indices IMP_Indices An indices object.
$opts array Additional options: - format: (string) Force to this format. DEFAULT: Auto-determine.
Результат mixed An array with the following keys: - addr: (array) Address lists (to, cc, bcc; Horde_Mail_Rfc822_List objects). - body: (string) The text of the body part. - format: (string) The format of the body message ('html', 'text'). - identity: (mixed) See IMP_Prefs_Identity#getMatchingIdentity(). - priority: (string) The message priority. - readreceipt: (boolean) Add return receipt headers? - subject: (string) Formatted subject. - type: (integer) - The compose type.

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

Saves a draft message.
public saveDraft ( array $headers, mixed $message, array $opts = [] ) : string
$headers array List of message headers (UTF-8).
$message mixed Either the message text (string) or a Horde_Mime_Part object that contains the text to send.
$opts array An array of options w/the following keys: - autosave: (boolean) Is this an auto-saved draft? - html: (boolean) Is this an HTML message? - priority: (string) The message priority ('high', 'normal', 'low'). - readreceipt: (boolean) Add return receipt headers?
Результат string Notification text on success (not HTML encoded).

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

Save a template message on the IMAP server.
public saveTemplate ( array $headers, mixed $message, array $opts = [] ) : string
$headers array List of message headers (UTF-8).
$message mixed Either the message text (string) or a Horde_Mime_Part object that contains the text to save.
$opts array An array of options w/the following keys: - html: (boolean) Is this an HTML message? - priority: (string) The message priority ('high', 'normal', 'low'). - readreceipt: (boolean) Add return receipt headers?
Результат string Notification text on success.

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

Sends a message.
public sendMessage ( Horde_Mail_Rfc822_List $email, Horde_Mime_Headers $headers, Horde_Mime_Part $message )
$email Horde_Mail_Rfc822_List The e-mail list to send to.
$headers Horde_Mime_Headers The object holding this message's headers.
$message Horde_Mime_Part The object that contains the text to send.

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

Send a redirect (a/k/a resent) message. See RFC 5322 [3.6.6].
public sendRedirectMessage ( mixed $to, boolean $log = true ) : array
$to mixed The addresses to redirect to.
$log boolean Whether to log the resending in the history and sentmail log.
Результат array An object with the following properties for each redirected message: - contents: (IMP_Contents) The contents object. - headers: (Horde_Mime_Headers) The header object. - mbox: (IMP_Mailbox) Mailbox of the message. - uid: (string) UID of the message.

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

Store draft compose data if session expires.
public sessionExpireDraft ( Horde_Variables $vars )
$vars Horde_Variables Object with the form data.

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

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

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

Uses a template to create a message.
public useTemplate ( IMP_Indices $indices, array $opts = [] ) : mixed
$indices IMP_Indices An indices object.
$opts array Additional options: - format: (string) Force to this format. DEFAULT: Auto-determine.
Результат mixed See resumeDraft().

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

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

Attachment data.
protected array $_atc
Результат array

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

The cache ID used to store object in session.
protected string $_cacheid
Результат string

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

Various metadata for this message.
protected array $_metadata
Результат array

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

The reply type.
protected int $_replytype
Результат integer

$atcId публичное свойство

Attachment ID counter.
public int $atcId
Результат integer

$changed публичное свойство

Either empty, 'changed', or 'deleted'.
public string $changed
Результат string

$charset публичное свойство

The charset to use for sending.
public string $charset
Результат string