Overview

Packages

  • IMP

Classes

  • IMP
  • IMP_Ajax_Addresses
  • IMP_Ajax_Application
  • IMP_Ajax_Application_Compose
  • IMP_Ajax_Application_Handler_Common
  • IMP_Ajax_Application_Handler_ComposeAttach
  • IMP_Ajax_Application_Handler_Draft
  • IMP_Ajax_Application_Handler_Dynamic
  • IMP_Ajax_Application_Handler_ImageUnblock
  • IMP_Ajax_Application_Handler_Mboxtoggle
  • IMP_Ajax_Application_Handler_Passphrase
  • IMP_Ajax_Application_Handler_Remote
  • IMP_Ajax_Application_Handler_RemotePrefs
  • IMP_Ajax_Application_Handler_Search
  • IMP_Ajax_Application_Handler_Smartmobile
  • IMP_Ajax_Application_ListMessages
  • IMP_Ajax_Application_ShowMessage
  • IMP_Ajax_Application_Viewport
  • IMP_Ajax_Application_Viewport_Error
  • IMP_Ajax_Imple_ImportEncryptKey
  • IMP_Ajax_Imple_ItipRequest
  • IMP_Ajax_Imple_PassphraseDialog
  • IMP_Ajax_Imple_VcardImport
  • IMP_Ajax_Queue
  • IMP_Api
  • IMP_Application
  • IMP_Auth
  • IMP_Basic_Base
  • IMP_Basic_Compose
  • IMP_Basic_Contacts
  • IMP_Basic_Error
  • IMP_Basic_Folders
  • IMP_Basic_Listinfo
  • IMP_Basic_Mailbox
  • IMP_Basic_Message
  • IMP_Basic_Pgp
  • IMP_Basic_Saveimage
  • IMP_Basic_Search
  • IMP_Basic_Searchbasic
  • IMP_Basic_Smime
  • IMP_Basic_Thread
  • IMP_Block_Newmail
  • IMP_Block_Summary
  • IMP_Compose
  • IMP_Compose_Attachment
  • IMP_Compose_Attachment_Linked_Metadata
  • IMP_Compose_Attachment_Metadata
  • IMP_Compose_Attachment_Storage
  • IMP_Compose_Attachment_Storage_AutoDetermine
  • IMP_Compose_Attachment_Storage_Temp
  • IMP_Compose_Attachment_Storage_VfsLinked
  • IMP_Compose_Exception
  • IMP_Compose_Exception_Address
  • IMP_Compose_HtmlSignature
  • IMP_Compose_Link
  • IMP_Compose_LinkedAttachment
  • IMP_Compose_Ui
  • IMP_Compose_View
  • IMP_Contacts
  • IMP_Contacts_Avatar_Addressbook
  • IMP_Contacts_Avatar_Gravatar
  • IMP_Contacts_Avatar_Unknown
  • IMP_Contacts_Flag_Host
  • IMP_Contacts_Image
  • IMP_Contents
  • IMP_Contents_InlineOutput
  • IMP_Contents_View
  • IMP_Crypt_Pgp
  • IMP_Crypt_Smime
  • IMP_Dynamic_AddressList
  • IMP_Dynamic_Base
  • IMP_Dynamic_Compose
  • IMP_Dynamic_Compose_Common
  • IMP_Dynamic_Helper_Base
  • IMP_Dynamic_Mailbox
  • IMP_Dynamic_Message
  • IMP_Exception
  • IMP_Factory_AuthImap
  • IMP_Factory_Compose
  • IMP_Factory_ComposeAtc
  • IMP_Factory_Contacts
  • IMP_Factory_Contents
  • IMP_Factory_Flags
  • IMP_Factory_Ftree
  • IMP_Factory_Identity
  • IMP_Factory_Imap
  • IMP_Factory_Mail
  • IMP_Factory_MailAutoconfig
  • IMP_Factory_Mailbox
  • IMP_Factory_MailboxCache
  • IMP_Factory_MailboxList
  • IMP_Factory_Maillog
  • IMP_Factory_MimeViewer
  • IMP_Factory_Pgp
  • IMP_Factory_PrefsSort
  • IMP_Factory_Quota
  • IMP_Factory_Search
  • IMP_Factory_Sentmail
  • IMP_Factory_Smime
  • IMP_Factory_Spam
  • IMP_Filter
  • IMP_Flag_Base
  • IMP_Flag_Imap
  • IMP_Flag_Imap_Answered
  • IMP_Flag_Imap_Deleted
  • IMP_Flag_Imap_Draft
  • IMP_Flag_Imap_Flagged
  • IMP_Flag_Imap_Forwarded
  • IMP_Flag_Imap_Junk
  • IMP_Flag_Imap_NotJunk
  • IMP_Flag_Imap_Seen
  • IMP_Flag_System_Attachment
  • IMP_Flag_System_Encrypted
  • IMP_Flag_System_HighPriority
  • IMP_Flag_System_List
  • IMP_Flag_System_LowPriority
  • IMP_Flag_System_Match_Address
  • IMP_Flag_System_Match_Flag
  • IMP_Flag_System_Match_Header
  • IMP_Flag_System_Personal
  • IMP_Flag_System_Signed
  • IMP_Flag_System_Unseen
  • IMP_Flag_User
  • IMP_Flags
  • IMP_Ftree
  • IMP_Ftree_Account
  • IMP_Ftree_Account_Imap
  • IMP_Ftree_Account_Inboxonly
  • IMP_Ftree_Account_Remote
  • IMP_Ftree_Account_Vfolder
  • IMP_Ftree_Element
  • IMP_Ftree_Eltdiff
  • IMP_Ftree_Iterator
  • IMP_Ftree_Iterator_Ancestors
  • IMP_Ftree_IteratorFilter
  • IMP_Ftree_IteratorFilter_Children
  • IMP_Ftree_IteratorFilter_Containers
  • IMP_Ftree_IteratorFilter_Expanded
  • IMP_Ftree_IteratorFilter_Invisible
  • IMP_Ftree_IteratorFilter_Mailboxes
  • IMP_Ftree_IteratorFilter_Nonimap
  • IMP_Ftree_IteratorFilter_Polled
  • IMP_Ftree_IteratorFilter_Remote
  • IMP_Ftree_IteratorFilter_Special
  • IMP_Ftree_IteratorFilter_Subscribed
  • IMP_Ftree_IteratorFilter_Vfolder
  • IMP_Ftree_Prefs
  • IMP_Ftree_Prefs_Expanded
  • IMP_Ftree_Prefs_Poll
  • IMP_Ftree_Select
  • IMP_Images
  • IMP_Imap
  • IMP_Imap_Acl
  • IMP_Imap_Cache_Wrapper
  • IMP_Imap_Config
  • IMP_Imap_Exception
  • IMP_Imap_Password
  • IMP_Imap_PermanentFlags
  • IMP_Imap_Remote
  • IMP_Indices
  • IMP_Indices_Mailbox
  • IMP_LoginTasks_SystemTask_GarbageCollection
  • IMP_LoginTasks_SystemTask_Upgrade
  • IMP_LoginTasks_SystemTask_UpgradeAuth
  • IMP_LoginTasks_Task_Autocreate
  • IMP_LoginTasks_Task_DeleteAttachmentsMonthly
  • IMP_LoginTasks_Task_DeleteSentmailMonthly
  • IMP_LoginTasks_Task_FilterOnLogin
  • IMP_LoginTasks_Task_PurgeSentmail
  • IMP_LoginTasks_Task_PurgeSpam
  • IMP_LoginTasks_Task_PurgeTrash
  • IMP_LoginTasks_Task_RecoverDraft
  • IMP_LoginTasks_Task_RenameSentmailMonthly
  • IMP_Mailbox
  • IMP_Mailbox_List
  • IMP_Mailbox_List_Pop3
  • IMP_Mailbox_List_Thread
  • IMP_Mailbox_List_Virtual
  • IMP_Mailbox_SessionCache
  • IMP_Mailbox_Ui
  • IMP_Maillog
  • IMP_Maillog_Log_Base
  • IMP_Maillog_Log_Forward
  • IMP_Maillog_Log_Mdn
  • IMP_Maillog_Log_Redirect
  • IMP_Maillog_Log_Reply
  • IMP_Maillog_Log_Replyall
  • IMP_Maillog_Log_Replylist
  • IMP_Maillog_Message
  • IMP_Maillog_Storage_Base
  • IMP_Maillog_Storage_Composite
  • IMP_Maillog_Storage_History
  • IMP_Maillog_Storage_Mdnsent
  • IMP_Maillog_Storage_Null
  • IMP_Mbox_Generate
  • IMP_Mbox_Import
  • IMP_Mbox_Size
  • IMP_Message
  • IMP_Message_Date
  • IMP_Message_Ui
  • IMP_Mime_Headers
  • IMP_Mime_Status
  • IMP_Mime_Status_RenderIssue
  • IMP_Mime_Status_RenderIssue_Display
  • IMP_Mime_Viewer_Alternative
  • IMP_Mime_Viewer_Appledouble
  • IMP_Mime_Viewer_Audio
  • IMP_Mime_Viewer_Enriched
  • IMP_Mime_Viewer_Externalbody
  • IMP_Mime_Viewer_Html
  • IMP_Mime_Viewer_Images
  • IMP_Mime_Viewer_Itip
  • IMP_Mime_Viewer_Mdn
  • IMP_Mime_Viewer_Partial
  • IMP_Mime_Viewer_Pdf
  • IMP_Mime_Viewer_Pgp
  • IMP_Mime_Viewer_Plain
  • IMP_Mime_Viewer_Related
  • IMP_Mime_Viewer_Rfc822
  • IMP_Mime_Viewer_Smil
  • IMP_Mime_Viewer_Smime
  • IMP_Mime_Viewer_Status
  • IMP_Mime_Viewer_Vcard
  • IMP_Mime_Viewer_Video
  • IMP_Mime_Viewer_Zip
  • IMP_Minimal_Base
  • IMP_Minimal_Compose
  • IMP_Minimal_Error
  • IMP_Minimal_Folders
  • IMP_Minimal_Mailbox
  • IMP_Minimal_Message
  • IMP_Minimal_Messagepart
  • IMP_Minimal_Search
  • IMP_Notification_Event_Status
  • IMP_Notification_Handler_Decorator_ImapAlerts
  • IMP_Notification_Handler_Decorator_NewmailNotify
  • IMP_Perms
  • IMP_Prefs_AttribText
  • IMP_Prefs_Identity
  • IMP_Prefs_Sort
  • IMP_Prefs_Sort_FixedDate
  • IMP_Prefs_Sort_None
  • IMP_Prefs_Sort_Sortpref
  • IMP_Prefs_Sort_Sortpref_Locked
  • IMP_Prefs_Special_Acl
  • IMP_Prefs_Special_ComposeTemplates
  • IMP_Prefs_Special_Drafts
  • IMP_Prefs_Special_Encrypt
  • IMP_Prefs_Special_Flag
  • IMP_Prefs_Special_HtmlSignature
  • IMP_Prefs_Special_ImageReplacement
  • IMP_Prefs_Special_InitialPage
  • IMP_Prefs_Special_Mailto
  • IMP_Prefs_Special_NewmailSound
  • IMP_Prefs_Special_PgpPrivateKey
  • IMP_Prefs_Special_PgpPublicKey
  • IMP_Prefs_Special_Remote
  • IMP_Prefs_Special_Searches
  • IMP_Prefs_Special_Sentmail
  • IMP_Prefs_Special_SmimePrivateKey
  • IMP_Prefs_Special_SmimePublicKey
  • IMP_Prefs_Special_Sourceselect
  • IMP_Prefs_Special_Spam
  • IMP_Prefs_Special_SpecialMboxes
  • IMP_Prefs_Special_Trash
  • IMP_Quota
  • IMP_Quota_Hook
  • IMP_Quota_Imap
  • IMP_Quota_Null
  • IMP_Quota_Ui
  • IMP_Remote
  • IMP_Remote_Account
  • IMP_Script_Package_Autocomplete
  • IMP_Script_Package_ComposeBase
  • IMP_Script_Package_DynamicBase
  • IMP_Script_Package_Editor
  • IMP_Script_Package_Imp
  • IMP_Search
  • IMP_Search_Element
  • IMP_Search_Element_Attachment
  • IMP_Search_Element_Autogenerated
  • IMP_Search_Element_Bulk
  • IMP_Search_Element_Contacts
  • IMP_Search_Element_Daterange
  • IMP_Search_Element_Flag
  • IMP_Search_Element_Header
  • IMP_Search_Element_Mailinglist
  • IMP_Search_Element_Or
  • IMP_Search_Element_Personal
  • IMP_Search_Element_Recipient
  • IMP_Search_Element_Size
  • IMP_Search_Element_Text
  • IMP_Search_Element_Within
  • IMP_Search_Filter
  • IMP_Search_Filter_Attachment
  • IMP_Search_Filter_Autogenerated
  • IMP_Search_Filter_Builtin
  • IMP_Search_Filter_Bulk
  • IMP_Search_Filter_Contacts
  • IMP_Search_Filter_Mailinglist
  • IMP_Search_Filter_Personal
  • IMP_Search_IteratorFilter
  • IMP_Search_Query
  • IMP_Search_Ui
  • IMP_Search_Vfolder
  • IMP_Search_Vfolder_Builtin
  • IMP_Search_Vfolder_Vinbox
  • IMP_Search_Vfolder_Vtrash
  • IMP_Sentmail
  • IMP_Sentmail_Mongo
  • IMP_Sentmail_Null
  • IMP_Sentmail_Sql
  • IMP_Smartmobile
  • IMP_Spam
  • IMP_Spam_Email
  • IMP_Spam_Null
  • IMP_Spam_Program
  • IMP_Test
  • IMP_Tree_Flist
  • IMP_Tree_Jquerymobile
  • IMP_Tree_Simplehtml
  • IMP_View_Subinfo

Interfaces

  • IMP_Compose_Attachment_Linked
  • IMP_Contacts_Avatar_Backend
  • IMP_Contacts_Flag_Backend
  • IMP_Spam_Base
  • Overview
  • Package
  • Class
  • Tree

Class IMP_Compose

The IMP_Compose:: class represents an outgoing mail message.

IMP_Compose implements ArrayAccess, Countable, IteratorAggregate
Package: IMP
Category: Horde
Copyright: 2002-2014 Horde LLC
License: GPL
Author: Michael Slusarz slusarz@horde.org
Located at Compose.php
Methods summary
public
# __construct( string $cacheid )

Constructor.

Constructor.

Parameters

$cacheid
The cache ID string.
public
# __wakeup( )

Tasks to do upon unserialize().

Tasks to do upon unserialize().

public
# destroy( string $action )

Destroys an IMP_Compose instance.

Destroys an IMP_Compose instance.

Parameters

$action
<p>The action performed to cause the end of this instance. Either 'cancel', 'discard', 'save_draft', or 'send'.</p>
public mixed
# getMetadata( string $name )

Gets metadata about the current object.

Gets metadata about the current object.

Parameters

$name
The metadata name.

Returns

mixed
The metadata value or null if it doesn't exist.
public string
# saveDraft( array $headers, mixed $message, array $opts = array() )

Saves a draft message.

Saves a draft message.

Parameters

$headers
List of message headers (UTF-8).
$message
<p>Either the message text (string) or a Horde_Mime_Part object that contains the text to send.</p>
$opts
<p>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?</p>

Returns

string
Notification text on success (not HTML encoded).

Throws

IMP_Compose_Exception
public mixed
# editAsNew( IMP_Indices $indices, array $opts = array() )

Edits a message as new.

Edits a message as new.

Parameters

$indices
An indices object.
$opts
<p>Additional options: - format: (string) Force to this format. DEFAULT: Auto-determine.</p>

Returns

mixed
See resumeDraft().

Throws

IMP_Compose_Exception

See

resumeDraft().
public mixed
# editTemplate( IMP_Indices $indices )

Edit an existing template message. Saving this template later (using saveTemplate()) will cause the original message to be deleted.

Edit an existing template message. Saving this template later (using saveTemplate()) will cause the original message to be deleted.

Parameters

$indices
An indices object.

Returns

mixed
See resumeDraft().

Throws

IMP_Compose_Exception
public mixed
# resumeDraft( IMP_Indices $indices, array $opts = array() )

Resumes a previously saved draft message.

Resumes a previously saved draft message.

Parameters

$indices
An indices object.
$opts
<p>Additional options: - format: (string) Force to this format. DEFAULT: Auto-determine.</p>

Returns

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.

Throws

IMP_Compose_Exception
public mixed
# useTemplate( IMP_Indices $indices, array $opts = array() )

Uses a template to create a message.

Uses a template to create a message.

Parameters

$indices
An indices object.
$opts
<p>Additional options: - format: (string) Force to this format. DEFAULT: Auto-determine.</p>

Returns

mixed
See resumeDraft().

Throws

IMP_Compose_Exception

See

resumeDraft().
public string
# saveTemplate( array $headers, mixed $message, array $opts = array() )

Save a template message on the IMAP server.

Save a template message on the IMAP server.

Parameters

$headers
List of message headers (UTF-8).
$message
<p>Either the message text (string) or a Horde_Mime_Part object that contains the text to save.</p>
$opts
<p>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?</p>

Returns

string
Notification text on success.

Throws

IMP_Compose_Exception
public boolean
# hasDrafts( )

Does this message have any drafts associated with it?

Does this message have any drafts associated with it?

Returns

boolean
True if draft messages exist.
public
# buildAndSendMessage( string $body, array $header, IMP_Prefs_Identity $identity, array $opts = array() )

Builds and sends a MIME message.

Builds and sends a MIME message.

Parameters

$body
The message body.
$header
List of message headers.
$identity
<p>The Identity object for the sender of this message.</p>
$opts
<p>An array of options w/the following keys: - encrypt: (integer) A flag whether to encrypt or sign the message. One of: - IMP_Crypt_Pgp::ENCRYPT</li> - IMP_Crypt_Pgp::SIGNENC</li> - IMP_Crypt_Smime::ENCRYPT</li> - IMP_Crypt_Smime::SIGNENC</li> - 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).</p>

Throws

Horde_Exception
IMP_Compose_Exception
IMP_Compose_Exception_Address
IMP_Exception
public
# sendMessage( Horde_Mail_Rfc822_List $email, Horde_Mime_Headers $headers, Horde_Mime_Part $message )

Sends a message.

Sends a message.

Parameters

$email
The e-mail list to send to.
$headers
<p>The object holding this message's headers.</p>
$message
<p>The object that contains the text to send.</p>

Throws

IMP_Compose_Exception
public
# _saveRecipients( Horde_Mail_Rfc822_List $recipients )

Save the recipients done in a sendMessage().

Save the recipients done in a sendMessage().

Parameters

$recipients
The list of recipients.
public array
# recipientList( array $hdr )

Cleans up and returns the recipient list. Method designed to parse user entered data; does not encode/validate addresses.

Cleans up and returns the recipient list. Method designed to parse user entered data; does not encode/validate addresses.

Parameters

$hdr
<p>An array of MIME headers and/or address list objects. Recipients will be extracted from the 'to', 'cc', and 'bcc' entries.</p>

Returns

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.

public array
# replyMessage( integer $type, IMP_Contents $contents, array $opts = array() )

Determines the reply text and headers for a message.

Determines the reply text and headers for a message.

Parameters

$type
The reply type (self::REPLY* constant).
$contents
An IMP_Contents object.
$opts
<p>Additional options: - format: (string) Force to this format. DEFAULT: Auto-determine. - to: (string) The recipient of the reply. Overrides the automatically determined value.</p>

Returns

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).

Throws

IMP_Exception
public array
# replyMessageText( IMP_Contents $contents, array $opts = array() )

Returns the reply text for a message.

Returns the reply text for a message.

Parameters

$contents
An IMP_Contents object.
$opts
<p>Additional options: - format: (string) Force to this format. DEFAULT: Auto-determine.</p>

Returns

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').

public array
# forwardMessage( integer $type, IMP_Contents $contents, boolean $attach = true, array $opts = array() )

Determine the text and headers for a forwarded message.

Determine the text and headers for a forwarded message.

Parameters

$type
<p>The forward type (self::FORWARD* constant).</p>
$contents
An IMP_Contents object.
$attach
Attach the forwarded message?
$opts
<p>Additional options: - format: (string) Force to this format. DEFAULT: Auto-determine.</p>

Returns

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.

Throws

IMP_Exception
public array
# forwardMessageText( IMP_Contents $contents, array $opts = array() )

Returns the forward text for a message.

Returns the forward text for a message.

Parameters

$contents
An IMP_Contents object.
$opts
<p>Additional options: - format: (string) Force to this format. DEFAULT: Auto-determine.</p>

Returns

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').

public array
# forwardMultipleMessages( IMP_Indices $indices )

Prepares a forwarded message using multiple messages.

Prepares a forwarded message using multiple messages.

Parameters

$indices
<p>An indices object containing the indices of the forwarded messages.</p>

Returns

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.

public
# redirectMessage( IMP_Indices $indices )

Prepare a redirect message.

Prepare a redirect message.

Parameters

$indices
An indices object.
public array
# sendRedirectMessage( mixed $to, boolean $log = true )

Send a redirect (a/k/a resent) message. See RFC 5322 [3.6.6].

Send a redirect (a/k/a resent) message. See RFC 5322 [3.6.6].

Parameters

$to
The addresses to redirect to.
$log
<p>Whether to log the resending in the history and sentmail log.</p>

Returns

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.

Throws

IMP_Compose_Exception
public string
# attachImapMessage( IMP_Indices $indices )

Add mail message(s) from the mail server as a message/rfc822 attachment.

Add mail message(s) from the mail server as a message/rfc822 attachment.

Parameters

$indices
An indices object.

Returns

string
Subject string.

Throws

IMP_Exception
public
# addRelatedAttachment( IMP_Compose_Attachment $atc_ob, DOMElement $node, string $attribute )

Add an attachment referred to in a related part.

Add an attachment referred to in a related part.

Parameters

$atc_ob
$act_ob Attachment data.
$node
<p>Node element containg the related reference.</p>
$attribute
<p>Element attribute containing the related reference.</p>
public
# deleteAllAttachments( )

Deletes all attachments.

Deletes all attachments.

public string
# getCacheId( )

Obtains the cache ID for the session object.

Obtains the cache ID for the session object.

Returns

string
The message cache ID.
public string
# getHmac( string $cacheid = null, string $user = null )

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.

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.

Parameters

$cacheid
<p>The cache ID to use. If null, uses cache ID of the compose object.</p>
$user
<p>The user ID to use. If null, uses the current authenticated username.</p>

Returns

string
The HMAC hash string.
public mixed
# additionalAttachmentsAllowed( )

How many more attachments are allowed?

How many more attachments are allowed?

Returns

mixed

Returns true if no attachment limit. Else returns the number of additional attachments allowed.

public integer
# maxAttachmentSize( )

What is the maximum attachment size?

What is the maximum attachment size?

Returns

integer
The maximum attachment size (in bytes).
public Horde_Url
# _getMessageTextCallback( mixed $id, mixed $attribute, mixed $node )

Callback used in _getMessageText().

Callback used in _getMessageText().

Returns

Horde_Url
public IMP_Compose_Attachment
# addAttachmentFromPart( Horde_Mime_Part $part )

Adds an attachment from Horde_Mime_Part data.

Adds an attachment from Horde_Mime_Part data.

Parameters

$part
<p>The object that contains the attachment data.</p>

Returns

IMP_Compose_Attachment
Attachment object.

Throws

IMP_Compose_Exception
public array
# addAttachmentFromUpload( string $field )

Add attachment from uploaded (form) data.

Add attachment from uploaded (form) data.

Parameters

$field
The form field name.

Returns

array

A list of IMP_Compose_Attachment objects (if successfully attached) or IMP_Compose_Exception objects (if error when attaching).

Throws

IMP_Compose_Exception
public
# sessionExpireDraft( Horde_Variables $vars )

Store draft compose data if session expires.

Store draft compose data if session expires.

Parameters

$vars
Object with the form data.
public
# recoverSessionExpireDraft( )

Restore session expiration draft compose data.

Restore session expiration draft compose data.

public mixed
# getContentsOb( )

If this object contains sufficient metadata, return an IMP_Contents object reflecting that metadata.

If this object contains sufficient metadata, return an IMP_Contents object reflecting that metadata.

Returns

mixed
Either an IMP_Contents object or null.
public string
# replyType( boolean $base = false )

Return the reply type.

Return the reply type.

Parameters

$base
Return the base reply type?

Returns

string
The reply type, or null if not a reply.
public static boolean
# canCompose( )

Is composing messages allowed?

Is composing messages allowed?

Returns

boolean
True if compose allowed.

Throws

Horde_Exception
public static boolean
# canUploadAttachment( )

Can attachments be uploaded?

Can attachments be uploaded?

Returns

boolean
True if attachments can be uploaded.
public static string
# text2html( string $msg )

Shortcut function to convert text -> HTML for purposes of composition.

Shortcut function to convert text -> HTML for purposes of composition.

Parameters

$msg
The message text.

Returns

string
HTML text.
public
# offsetExists( mixed $offset )

Implementation of

ArrayAccess::offsetExists()
public
# offsetGet( mixed $offset )

Implementation of

ArrayAccess::offsetGet()
public
# offsetSet( mixed $offset, mixed $value )

Implementation of

ArrayAccess::offsetSet()
public
# offsetUnset( mixed $offset )

Implementation of

ArrayAccess::offsetUnset()
public
# __toString( )

String representation: the cache ID.

String representation: the cache ID.

public integer
# count( )

Returns the number of attachments currently in this message.

Returns the number of attachments currently in this message.

Returns

integer
The number of attachments in this message.

Implementation of

Countable::count()
public
# getIterator( )

Implementation of

IteratorAggregate::getIterator()
Constants summary
string VFS_DRAFTS_PATH
# '.horde/imp/drafts'
integer COMPOSE
# 0
integer REPLY
# 1
integer REPLY_ALL
# 2
integer REPLY_AUTO
# 3
integer REPLY_LIST
# 4
integer REPLY_SENDER
# 5
integer FORWARD
# 6
integer FORWARD_ATTACH
# 7
integer FORWARD_AUTO
# 8
integer FORWARD_BODY
# 9
integer FORWARD_BOTH
# 10
integer REDIRECT
# 11
integer EDITASNEW
# 12
integer TEMPLATE
# 13
string RELATED_ATTR
# 'imp_related_attr'
string HTML_BLOCKQUOTE
# '<blockquote type="cite" style="border-left:2px solid blue;margin-left:2px;padding-left:12px;">'
Properties summary
public integer $atcId

Attachment ID counter.

Attachment ID counter.

# 0
public string $changed

Mark as changed for purposes of storing in the session. Either empty, 'changed', or 'deleted'.

Mark as changed for purposes of storing in the session. Either empty, 'changed', or 'deleted'.

# ''
public string $charset

The charset to use for sending.

The charset to use for sending.

#
API documentation generated by ApiGen