[ class tree: Mail_IMAPv2 ] [ index: Mail_IMAPv2 ] [ all elements ]

Class: Mail_IMAPv2_ManageMB

Source Location: /Mail_IMAPv2-0.2.1/Mail/IMAPv2/ManageMB/ManageMB.php

Class Overview


This class provides an extension to Mail_IMAPv2 that adds mailbox management



  • 0.1.0 Beta


  • (c) Copyright 2004, Richard York, All Rights Reserved.


Inherited Variables

Inherited Methods

Class: Mail_IMAPv2

Constructor. Optionally set the IMAP resource stream.
Wrapper function for imap_alerts. Implodes the array returned by imap_alerts, (if any) and returns the text.
Wrapper method for imap_close. Close the IMAP resource stream.
Wrapper method for imap_open. Accepts a URI abstraction in the following format: imap:// instead of the standard connection arguments used in imap_open.
Converts an integer containing the number of bytes in a file to one of Bytes, Kilobytes, Megabytes, or Gigabytes, appending the unit of measurement.
Wrapper function for imap_delete. Sets the marked for deletion flag. Note: POP3 mailboxes do not remember flag settings between connections, for POP3 mailboxes this function should be used in addtion to expunge.
Wrapper function for imap_errors. Implodes the array returned by imap_errors, (if any) and returns the error text.
Wrapper function for imap_expunge. Expunges messages marked for deletion.
Searches all message parts for the specified MIME type. Use getBody with $action option Mail_IMAPv2_LITERAL_DECODE to view MIME type parts retrieved.
Searches parts array set in $this->_declareParts() for a displayable message.
Set member variable containing header information. Creates an array containing associative indices referring to various header information. Use or on the $header member variable to view information gathered by this function.
Wrapper method for imap_list. Calling on this function will return a list of mailboxes.
sets up member variables containing inline parts and attachments for a specific
Retreives information about the current mailbox's quota. Rounds up quota sizes and appends the unit of measurment. Returns information in a multi-dimensional associative array.
Set member variable $rawHeaders to contain Raw Header information for a part. Returns default header part id on success, returns false on failure.
Returns entire unparsed message body. See imap_body for options.
Looks to see if this part has any inline parts associated with it.
Wrapper method for imap_num_msg.
Wrapper function for imap_setflag_full. Sets various message flags.
Set the $option member variable, which is used to specify optional imap_* function arguments (labeled in the manual as flags or options e.g. FT_UID, OP_READONLY, etc).
Destroys variables set by getHeaders.
Destroys variables set by getParts and _declareParts.
Checks if the part has been parsed, if not calls on _declareParts to parse the message.
Gather message information returned by imap_fetchstructure and recursively iterate

Class Details

[line 55]
This class provides an extension to Mail_IMAPv2 that adds mailbox management

features. These features include the ability to create/rename/delete (sub)mailboxes on the server, as well as the ability to move/copy mail from one folder to another, and finally the ability to import messages into the server.

  • Tutorial:
  • Author: Richard York <>
  • Version: 0.1.0 Beta
  • Copyright: (c) Copyright 2004, Richard York, All Rights Reserved.
  • Todo: add simple message filter function
  • Since: PHP 4.2.0
  • Since: C-Client 2001
  • License: BSD

[ Top ]

Method Detail

Mail_IMAPv2_ManageMB (Constructor)   [line 62]

Mail_IMAPv2_ManageMB Mail_IMAPv2_ManageMB( $connection, [ $get_info = TRUE])

  • Tutorial:


   $connection   — 
   $get_info   — 

[ Top ]

importMail   [line 203]

BOOL importMail( string $dest_mb, array $messages)

This method provides the functionality to import MIME messages into the server using the imap_append method.
  • Tutorial:
  • See: imap_append
  • Access: public


string   $dest_mb   —  The destination mailbox where the messages will be imported to.
array   $messages   —  An array of MIME messages to import.

[ Top ]

manageMail   [line 152]

BOOL manageMail( string $action, array $msg_list, string $dest_mb)

This method manages the mail inside of a mailbox and allows mail to be copied or moved from the mailbox that the user is connected to to the specified mailbox.
  • Tutorial:
  • See: imap_mail_move
  • See: imap_mail_copy
  • Access: public


string   $action   —  One of copy|move if copy, a copy of the message will remain in the current mailbox. If move the message is permenently moved to the specified mailbox.
array   $msg_list   —  An array of messages to move, see (@link imap_mail_copy} or imap_mail_move for more options. The array is imploded into a comma separated list, therefore other options such as 1:10 syntax or * syntax may be specified in the array.
string   $dest_mb   —  The destination mailbox, such as 'INBOX.Drafts' or 'INBOX.Sent'

[ Top ]

manageMB   [line 85]

BOOL manageMB( string $action, string $mb_name, [string $mb_rename = NULL])

This method creates, renames and deletes mailboxes from the server.
  • Tutorial:
  • See: imap_deletemailbox
  • See: imap_renamemailbox
  • See: imap_createmailbox
  • Access: public


string   $action   —  One of create|rename|delete, this tells the method what you want to do with a mailbox.
string   $mb_name   —  The name of the mailbox to create, delete or rename.
string   $mb_rename   —  (optional) New name for the mailbox, if it is being renamed.

[ Top ]

Documentation generated on Wed, 09 Dec 2015 22:51:32 +0000 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.