Mail_IMAPv2
[ 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

Mail_IMAPv2
   |
   --Mail_IMAPv2_ManageMB

This class provides an extension to Mail_IMAPv2 that adds mailbox management


Author(s):

Version:

  • 0.1.0 Beta

Copyright:

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

Methods


Inherited Variables

Inherited Methods

Class: Mail_IMAPv2

Mail_IMAPv2::Mail_IMAPv2()
Constructor. Optionally set the IMAP resource stream.
Mail_IMAPv2::alerts()
Wrapper function for imap_alerts. Implodes the array returned by imap_alerts, (if any) and returns the text.
Mail_IMAPv2::close()
Wrapper method for imap_close. Close the IMAP resource stream.
Mail_IMAPv2::connect()
Wrapper method for imap_open. Accepts a URI abstraction in the following format: imap://user:pass@mail.example.com:143/INBOX#notls instead of the standard connection arguments used in imap_open.
Mail_IMAPv2::convertBytes()
Converts an integer containing the number of bytes in a file to one of Bytes, Kilobytes, Megabytes, or Gigabytes, appending the unit of measurement.
Mail_IMAPv2::delete()
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.
Mail_IMAPv2::errors()
Wrapper function for imap_errors. Implodes the array returned by imap_errors, (if any) and returns the error text.
Mail_IMAPv2::errorTemplate()
Mail_IMAPv2::expunge()
Wrapper function for imap_expunge. Expunges messages marked for deletion.
Mail_IMAPv2::extractMIME()
Searches all message parts for the specified MIME type. Use getBody with $action option Mail_IMAPv2_LITERAL_DECODE to view MIME type parts retrieved.
Mail_IMAPv2::getBody()
Searches parts array set in $this->_declareParts() for a displayable message.
Mail_IMAPv2::getHeaders()
Set member variable containing header information. Creates an array containing associative indices referring to various header information. Use http://www.php.net/var_dump or http://www.php.net/print_r on the $header member variable to view information gathered by this function.
Mail_IMAPv2::getMailboxes()
Wrapper method for imap_list. Calling on this function will return a list of mailboxes.
Mail_IMAPv2::getMailboxInfo()
Mail_IMAPv2::getParts()
sets up member variables containing inline parts and attachments for a specific
Mail_IMAPv2::getQuota()
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.
Mail_IMAPv2::getRawHeaders()
Set member variable $rawHeaders to contain Raw Header information for a part. Returns default header part id on success, returns false on failure.
Mail_IMAPv2::getRawMessage()
Returns entire unparsed message body. See imap_body for options.
Mail_IMAPv2::getRelatedParts()
Looks to see if this part has any inline parts associated with it.
Mail_IMAPv2::messageCount()
Wrapper method for imap_num_msg.
Mail_IMAPv2::setFlags()
Wrapper function for imap_setflag_full. Sets various message flags.
Mail_IMAPv2::setOptions()
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).
Mail_IMAPv2::unsetHeaders()
Destroys variables set by getHeaders.
Mail_IMAPv2::unsetParts()
Destroys variables set by getParts and _declareParts.
Mail_IMAPv2::_checkIfParsed()
Checks if the part has been parsed, if not calls on _declareParts to parse the message.
Mail_IMAPv2::_declareParts()
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: http://www.smilingsouls.net/Mail_IMAP
  • Author: Richard York <rich_y@php.net>
  • 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: http://www.smilingsouls.net/Mail_IMAP?content=Mail_IMAP_ManageMB/Mail_IMAP_ManageMB

Parameters:

   $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: http://www.smilingsouls.net/Mail_IMAP?content=Mail_IMAP_ManageMB/importMail
  • See: imap_append
  • Access: public

Parameters:

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: http://www.smilingsouls.net/Mail_IMAP?content=Mail_IMAP_ManageMB/manageMail
  • See: imap_mail_move
  • See: imap_mail_copy
  • Access: public

Parameters:

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: http://www.smilingsouls.net/Mail_IMAP?content=Mail_IMAP_ManageMB/manageMB
  • See: imap_deletemailbox
  • See: imap_renamemailbox
  • See: imap_createmailbox
  • Access: public

Parameters:

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 Tue, 12 Oct 2010 13:30:05 +0000 by phpDocumentor 1.4.3. PEAR Logo Copyright © PHP Group 2004.