Methods summary
public
|
#
__construct( mixed $app, mixed $vars, mixed $action = null )
|
public
string
|
#
responseType( )
Determines the HTTP response output type.
Determines the HTTP response output type.
Returns
string The output type.
See
Horde::sendHTTPResponse().
|
public
|
#
doAction( )
May add the following entries to the output object:
- flag: (array) See IMP_Ajax_Queue::generate().
- poll: (array) See IMP_Ajax_Queue::generate().
- quota: (array) See IMP_Ajax_Queue::generate().
May add the following entries to the output object: - flag: (array) See IMP_Ajax_Queue::generate(). - poll: (array) See IMP_Ajax_Queue::generate(). - quota: (array) See IMP_Ajax_Queue::generate().
|
public
boolean
|
#
createMailboxPrepare( )
AJAX action: Check access rights for creation of a submailbox.
AJAX action: Check access rights for creation of a submailbox.
Variables used: - mbox: (string) The name of the mailbox to check (base64url encoded).
Returns
boolean True if submailboxes can be created.
|
public
mixed
|
#
createMailbox( )
AJAX action: Create a mailbox.
AJAX action: Create a mailbox.
Variables used: - mbox: (string) The name of the new mailbox. - noexpand: (integer) Submailbox is not yet expanded. - parent: (string) The parent mailbox (base64url encoded).
Returns
mixed False on failure, or an object with the following
entries:
- mailbox: (object) Mailboxes that were altered. Contains the
following properties:
a: (array) Mailboxes that were added (base64url encoded).
c: (array) Mailboxes that were changed (base64url encoded).
d: (array) Mailboxes that were deleted (base64url encoded).
|
public
boolean
|
#
deleteMailboxPrepare( )
AJAX action: Check access rights for deletion/rename of mailbox.
AJAX action: Check access rights for deletion/rename of mailbox.
Variables used: - mbox: (string) The name of the mailbox to check (base64url encoded). - type: (string) Either 'delete' or 'rename'.
Returns
boolean True if mailbox can be deleted/renamed.
|
public
mixed
|
#
deleteMailbox( )
AJAX action: Delete a mailbox.
AJAX action: Delete a mailbox.
Variables used: - mbox: (string) The full mailbox name to delete (base64url encoded).
Returns
mixed False on failure, or an object with the following
entries:
- mailbox: (object) Mailboxes that were altered. Contains the
following properties:
a: (array) Mailboxes that were added (base64url encoded).
c: (array) Mailboxes that were changed (base64url encoded).
d: (array) Mailboxes that were deleted (base64url encoded).
|
public
mixed
|
#
renameMailbox( )
AJAX action: Rename a mailbox.
AJAX action: Rename a mailbox.
Variables used: - new_name: (string) New mailbox name (child node) (UTF-8). - new_parent: (string) New parent name (UTF7-IMAP) (base64url encoded). - old_name: (string) Full name of old mailbox (base64url encoded).
Returns
mixed False on failure, or an object with the following
entries:
- mailbox: (object) Mailboxes that were altered. Contains the
following properties:
a: (array) Mailboxes that were added (base64url encoded).
c: (array) Mailboxes that were changed (base64url encoded).
d: (array) Mailboxes that were deleted (base64url encoded).
|
public
integer
|
#
emptyMailboxPrepare( )
AJAX action: Check access rights for a mailbox, and provide number of
messages to be emptied.
AJAX action: Check access rights for a mailbox, and provide number of
messages to be emptied.
Variables used: - mbox: (string) The name of the mailbox to check (base64url encoded).
Returns
integer The number of messages to be deleted.
|
public
mixed
|
#
emptyMailbox( )
AJAX action: Empty a mailbox.
AJAX action: Empty a mailbox.
Variables used: - mbox: (string) The full mailbox name to empty (base64url encoded).
Returns
mixed False on failure, or an object with the following
entries:
- ViewPort: (object) See _viewPortData().
|
public
mixed
|
#
flagAll( )
AJAX action: Flag all messages in a mailbox.
AJAX action: Flag all messages in a mailbox.
Variables used: - add: (integer) Add the flags? - flags: (string) The IMAP flags to add/remove (JSON serialized array). - mbox: (string) The full mailbox name (base64url encoded).
Returns
mixed False on failure, object on success (empty object
ensures queued actions will be run).
|
public
mixed
|
#
listMailboxes( )
AJAX action: List mailboxes.
AJAX action: List mailboxes.
Variables used: - all: (integer) 1 to show all mailboxes. - initial: (string) 1 to indicate the initial request for mailbox list. - mboxes: (string) The list of mailboxes to process (JSON encoded array; mailboxes are base64url encoded). - reload: (integer) 1 to force reload of mailboxes. - unsub: (integer) 1 to show unsubscribed mailboxes.
Returns
mixed False on failure, or an object with the following
entries:
- expand: (integer) Expand subfolders on load.
- mailbox: (object) Mailboxes that were altered. Contains the
following properties:
a: (array) Mailboxes that were added (base64url encoded).
c: (array) Mailboxes that were changed (base64url encoded).
d: (array) Mailboxes that were deleted (base64url encoded).
|
public
boolean
|
#
expandMailboxes( )
AJAX action: Expand mailboxes (saves expanded state in prefs).
AJAX action: Expand mailboxes (saves expanded state in prefs).
Variables used: - mboxes: (string) The list of mailboxes to process (JSON encoded array; mailboxes are base64url encoded).
Returns
boolean True.
|
public
boolean
|
#
collapseMailboxes( )
AJAX action: Collapse mailboxes.
AJAX action: Collapse mailboxes.
Variables used: - all: (integer) 1 to show all mailboxes. - mboxes: (string) The list of mailboxes to process (JSON encoded array; mailboxes are base64url encoded) if 'all' is 0.
Returns
boolean True.
|
public
mixed
|
#
poll( )
AJAX action: Poll mailboxes.
AJAX action: Poll mailboxes.
See the list of variables needed for _changed() and _viewPortData().
Additional variables used: - mboxes: (string) The list of mailboxes to process (JSON encoded array; mailboxes are base64url encoded) if 'all' is 0.
Returns
mixed False on failure, or an object with the following
entries:
- ViewPort: (object) See _viewPortData().
|
public
mixed
|
#
modifyPoll( )
AJAX action: Modify list of polled mailboxes.
AJAX action: Modify list of polled mailboxes.
Variables used: - add: (integer) 1 to add to the poll list, 0 to remove. - mbox: (string) The full mailbox name to modify (base64url encoded).
Returns
mixed False on failure, or an object with the following
entries:
- add: (integer) 1 if added to the poll list, 0 if removed.
- mbox: (string) The full mailbox name modified.
|
public
boolean
|
#
subscribe( )
AJAX action: [un]Subscribe to a mailbox.
AJAX action: [un]Subscribe to a mailbox.
Variables used: - mbox: (string) The full mailbox name to [un]subscribe to (base64url encoded). - sub: (integer) 1 to subscribe, empty to unsubscribe.
Returns
boolean True on success, false on failure.
|
public
object
|
#
importMailbox( )
AJAX action: Import a mailbox.
AJAX action: Import a mailbox.
Variables used: - import_mbox: (string) The mailbox to import into (base64url encoded).
Returns
object False on failure, or an object with the following
properties:
- action: (string) The action name (importMailbox).
- mbox: (string) The mailbox the messages were imported to (base64url
encoded).
|
public
mixed
|
#
viewPort( )
AJAX action: Output ViewPort data.
AJAX action: Output ViewPort data.
See the list of variables needed for _changed() and _viewPortData().
Additional variables used: - checkcache: (integer) If 1, only send data if cache has been invalidated. - rangeslice: (string) Range slice. See js/viewport.js. - requestid: (string) Request ID. See js/viewport.js. - sortby: (integer) The Horde_Imap_Client sort constant. - sortdir: (integer) 0 for ascending, 1 for descending.
Returns
mixed False on failure, or an object with the following
entries:
- ViewPort: (object) See _viewPortData().
|
public
mixed
|
#
moveMessages( )
AJAX action: Move messages.
AJAX action: Move messages.
See the list of variables needed for _changed(),
_generateDeleteResult(), and _checkUidvalidity(). Additional variables
used: - mboxto: (string) Mailbox to move the message to (base64url encoded). - uid: (string) Indices of the messages to move (IMAP sequence string; mailboxes are base64url encoded).
Returns
mixed False on failure, or an object (see
_generateDeleteResult() for format).
|
public
mixed
|
#
copyMessages( )
AJAX action: Copy messages.
AJAX action: Copy messages.
See the list of variables needed for _checkUidvalidity(). Additional
variables used: - mboxto: (string) Mailbox to copy the message to (base64url encoded). - uid: (string) Indices of the messages to copy (IMAP sequence string; mailboxes are base64url encoded).
Returns
mixed False on failure, or an object with the following
entries:
- ViewPort: (object) See _viewPortData().
|
public
mixed
|
#
flagMessages( )
AJAX action: Flag messages.
AJAX action: Flag messages.
See the list of variables needed for _changed() and
_checkUidvalidity(). Additional variables used: - add: (integer) Set the flag? - flags: (string) The flags to set (JSON serialized array). - uid: (string) Indices of the messages to flag (IMAP sequence string; mailboxes are base64url encoded).
Returns
mixed False on failure, or an object with the following
entries:
- ViewPort: (object) See _viewPortData().
|
public
mixed
|
#
deleteMessages( )
AJAX action: Delete messages.
AJAX action: Delete messages.
See the list of variables needed for _changed(),
_generateDeleteResult(), and _checkUidvalidity(). Additional variables
used: - uid: (string) Indices of the messages to delete (IMAP sequence string; mailboxes are base64url encoded).
Returns
mixed False on failure, or an object (see
_generateDeleteResult() for format).
|
public
boolean
|
#
addContact( )
AJAX action: Add contact.
AJAX action: Add contact.
Variables used: - email: (string) The email address to name. - name: (string) The name associated with the email address.
Returns
boolean True on success, false on failure.
|
public
mixed
|
#
reportSpam( )
AJAX action: Report message as [not]spam.
AJAX action: Report message as [not]spam.
See the list of variables needed for _changed(),
_generateDeleteResult(), and _checkUidvalidity(). Additional variables
used: - spam: (integer) 1 to mark as spam, 0 to mark as innocent. - uid: (string) Indices of the messages to report (IMAP sequence string; mailboxes are base64url encoded).
Returns
mixed If messages were deleted, data as returned by
_generateDeleteResult(). Else, true.
|
public
mixed
|
#
blacklist( )
AJAX action: Blacklist/whitelist addresses from messages.
AJAX action: Blacklist/whitelist addresses from messages.
See the list of variables needed for _changed(),
_generateDeleteResult(), and _checkUidvalidity(). Additional variables
used: - blacklist: (integer) 1 to blacklist, 0 to whitelist. - uid: (string) Indices of the messages to report (IMAP sequence string; mailboxes are base64url encoded).
Returns
mixed False on failure, or an object (see
_generateDeleteResult() for format).
|
public
mixed
|
#
showMessage( )
AJAX action: Generate data necessary to display a message.
AJAX action: Generate data necessary to display a message.
See the list of variables needed for _changed() and
_checkUidvalidity(). Additional variables used: - preview: (integer) If set, return preview data. Otherwise, return full data. - uid: (string) Index of the messages to display (IMAP sequence string; mailbox is base64url encoded) - must be single index.
Returns
mixed If viewing full message, on error will return null.
Otherwise an object with the following entries:
- message: (object) Return from IMP_Views_ShowMessage::showMessage().
If viewing preview, on error this object will contain
error and errortype properties.
|
public
object
|
#
html2Text( )
AJAX action: Convert HTML to text (compose data).
AJAX action: Convert HTML to text (compose data).
Variables used: - changed: (integer) Has the text changed from the original? - identity: (integer) The current identity. - imp_compose: (string) The IMP_Compose cache identifier. - text: (string) The text to convert.
Returns
object An object with the following entries:
- text: (string) The converted text.
|
public
object
|
#
text2Html( )
AJAX action: Convert text to HTML (compose data).
AJAX action: Convert text to HTML (compose data).
Variables used: - changed: (integer) Has the text changed from the original? - identity: (integer) The current identity. - imp_compose: (string) The IMP_Compose cache identifier. - text: (string) The text to convert.
Returns
object An object with the following entries:
- text: (string) The converted text.
|
public
mixed
|
#
getForwardData( )
AJAX action: Get forward compose data.
AJAX action: Get forward compose data.
See the list of variables needed for _checkUidvalidity(). Additional
variables used: - dataonly: (boolean) Only return data information (DEFAULT: false). - imp_compose: (string) The IMP_Compose cache identifier. - type: (string) Forward type. - uid: (string) Indices of the messages to forward (IMAP sequence string; mailboxes are base64url encoded).
Returns
mixed False on failure, or an object with the following
entries:
- body: (string) The body text of the message.
- format: (string) Either 'text' or 'html'.
- fwd_list: (array) See _getAttachmentInfo().
- header: (array) The headers of the message.
- identity: (integer) The identity ID to use for this message.
- imp_compose: (string) The IMP_Compose cache identifier.
- opts: (array) Additional options needed for DimpCompose.fillForm().
- type: (string) The input 'type' value.
- ViewPort: (object) See _viewPortData().
|
public
mixed
|
#
getReplyData( )
AJAX action: Get reply data.
AJAX action: Get reply data.
See the list of variables needed for _checkUidvalidity(). Additional
variables used: - headeronly: (boolean) Only return header information (DEFAULT: false). - imp_compose: (string) The IMP_Compose cache identifier. - type: (string) See IMP_Compose::replyMessage(). - uid: (string) Indices of the messages to reply to (IMAP sequence string; mailboxes are base64url encoded).
Returns
mixed False on failure, or an object with the following
entries:
- body: (string) The body text of the message.
- format: (string) Either 'text' or 'html'.
- header: (array) The headers of the message.
- identity: (integer) The identity ID to use for this message.
- imp_compose: (string) The IMP_Compose cache identifier.
- opts: (array) Additional options needed for DimpCompose.fillForm().
- type: (string) The input 'type' value.
- ViewPort: (object) See _viewPortData().
|
public
mixed
|
#
getRedirectData( )
AJAX action: Get compose redirect data.
AJAX action: Get compose redirect data.
Variables used: - uid: (string) Index of the message to redirect (IMAP sequence string; mailbox is base64url encoded).
Returns
mixed False on failure, or an object with the following
entries:
- imp_compose: (string) The IMP_Compose cache identifier.
- type: (string) The input 'type' value.
|
public
boolean
|
#
cancelCompose( )
AJAX action: Cancel compose.
AJAX action: Cancel compose.
Variables used: - imp_compose: (string) The IMP_Compose cache identifier.
Returns
boolean True.
|
public
boolean
|
#
deleteDraft( )
AJAX action: Delete a draft.
AJAX action: Delete a draft.
Variables used: - imp_compose: (string) The IMP_Compose cache identifier.
Returns
boolean True.
|
public
boolean
|
#
deleteAttach( )
AJAX action: Delete an attachment from compose data.
AJAX action: Delete an attachment from compose data.
Variables used: - atc_indices: (string) [JSON array] Attachment IDs to delete. - imp_compose: (string) The IMP_Compose cache identifier.
Returns
boolean True.
|
public
mixed
|
#
purgeDeleted( )
AJAX action: Purge deleted messages.
AJAX action: Purge deleted messages.
See the list of variables needed for _changed(), and
_generateDeleteResult().
Returns
mixed False on failure, or an object (see
_generateDeleteResult() for format).
|
public
mixed
|
#
sendMDN( )
AJAX action: Send a Message Disposition Notification (MDN).
AJAX action: Send a Message Disposition Notification (MDN).
Variables used: - uid: (string) Index of the messages to send MDN for (IMAP sequence string; mailbox is base64url encoded) - must be single index.
Returns
mixed False on failure, or an object with these properties:
- mbox: (string) Mailbox of message (base64url encoded).
- uid: (integer) UID of message.
|
public
mixed
|
#
stripAttachment( )
AJAX action: strip attachment.
AJAX action: strip attachment.
See the list of variables needed for _changed() and
_checkUidvalidity(). Additional variables used: - uid: (string) Index of the messages to preview (IMAP sequence string; bsae64url encoded) - must be single index.
Returns
mixed False on failure, the return from showMessage() on
success along with these properties:
- oldmbox: (string) Mailbox of old message (base64url encoded).
- olduid: (integer) UID of old message.
- ViewPort: (object) See _viewPortData().
|
public
object
|
#
addAttachment( )
AJAX action: Add an attachment to a compose message.
AJAX action: Add an attachment to a compose message.
Variables used: - composeCache: (string) The IMP_Compose cache identifier.
Returns
object An object with the following entries:
- atc: (integer) The attachment ID.
- error: (string) An error message.
- imp_compose: (string) The IMP_Compose cache identifier.
- success: (integer) 1 on success, 0 on failure.
|
public
object
|
#
autoSaveDraft( )
AJAX action: Auto save a draft message.
AJAX action: Auto save a draft message.
Returns
object See self::_dimpDraftAction().
|
public
object
|
#
saveDraft( )
AJAX action: Save a draft message.
AJAX action: Save a draft message.
Returns
object See self::_dimpDraftAction().
|
public
object
|
#
sendMessage( )
AJAX action: Send a message.
AJAX action: Send a message.
See the list of variables needed for _dimpComposeSetup(). Additional
variables used: - encrypt: (integer) The encryption method to use (IMP ENCRYPT constants). - html: (integer) In HTML compose mode? - message: (string) The message text. - priority: (string) The priority of the message. - request_read_receipt: (boolean) Add request read receipt header? - save_attachments_select: (boolean) Whether to save attachments. - save_sent_mail: (boolean) True if saving sent mail. - save_sent_mail_folder: (string) base64url encoded version of sent mailbox to use.
Returns
object An object with the following entries:
- action: (string) The AJAX action string
- draft_delete: (integer) If set, remove auto-saved drafts.
- encryptjs: (array) Javascript to run after encryption failure.
- flag: (array) See IMP_Ajax_Queue::generate().
- identity: (integer) If set, this is the identity that is tied to
the current recipient address.
- log: (array) Maillog information
- mailbox: (array) See _getMailboxResponse().
- mbox: (string) Mailbox of original message (base64url encoded).
- success: (integer) 1 on success, 0 on failure.
- uid: (integer) IMAP UID of original message.
|
public
object
|
#
redirectMessage( )
Redirect the message.
Variables used: - composeCache: (string) The IMP_Compose cache identifier. - redirect_to: (string) The address(es) to redirect to.
Returns
object An object with the following entries:
- action: (string) 'redirectMessage'.
- log: (array) TODO
- success: (integer) 1 on success, 0 on failure.
|
public
object
|
#
searchMailboxList( )
AJAX action: Create mailbox select list for advanced search page.
AJAX action: Create mailbox select list for advanced search page.
Variables used: - unsub: (integer) If set, includes unsubscribed mailboxes.Th
Returns
object An object with the following entries:
- folder_list: (array)
- tree: (string)
|