Class Zend_Mail_Imap

Description

Implements interfaces:

Located in /Mail/Imap.php (line 56)

Zend_Mail_Abstract
   |
   --Zend_Mail_Imap
Method Summary
 Zend_Mail_Imap __construct ($params $params)
 void __destruct ()
 void close ()
 int countMessages ([int $flags = null])
 Zend_Mail_Folder getFolders ([string $rootFolder = null])
 Zend_Mail_Message getHeader (int $id, [int $bodyLines = 0])
 int|array getSize ([int $id = 0])
 void noop ()
 void removeMessage (int $id)
 void selectFolder (Zend_Mail_Folder|string $globalName)
 void __get ( $var)
Variables
Methods
Constructor __construct (line 138)

create instance with parameters

Supported paramters are

  • host hostname or ip address of IMAP server
  • user username
  • password password for user 'username' [optional, default = '']
  • port port for IMAP server [optional, default = 110]
  • ssl 'SSL' or 'TLS' for secure sockets
  • folder select this folder [optional, default = 'INBOX']

  • access: public
  • throws: Zend_Mail_Exception
Zend_Mail_Imap __construct ($params $params)
  • $params $params: array mail reader specific parameters

Redefinition of:
Zend_Mail_Abstract::__construct()
Create instance with parameters
Destructor __destruct (line 170)

public destructor

  • access: public
void __destruct ()

Redefinition of:
Zend_Mail_Abstract::__destruct()
Destructor calls close() and therefore closes the resource.
close (line 181)

Close resource for mail lib. If you need to control, when the resource is closed. Otherwise the destructor would call this.

  • access: public
void close ()

Redefinition of:
Zend_Mail_Abstract::close()
Close resource for mail lib. If you need to control, when the resource is closed. Otherwise the destructor would call this.
countMessages (line 71)

Count messages all messages in current box No flags are supported by POP3 (exceptions is thrown)

  • return: number of messages
  • access: public
  • throws: Zend_Mail_Exception
int countMessages ([int $flags = null])
  • int $flags: filter by flags

Redefinition of:
Zend_Mail_Abstract::countMessages()
Count messages with a flag or all messages in current box/folder Flags might not be supported by all mail libs (exceptions is thrown)
getCurrentFolder (line 301)

get Zend_Mail_Folder instance for current folder

  • return: instance of current folder
  • access: public
  • throws: Zend_Mail_Exception
Zend_Mail_Folder getCurrentFolder ()

Implementation of:
Zend_Mail_Folder_Interface::getCurrentFolder()
get Zend_Mail_Folder instance for current folder
getFolders (line 232)

get root folder or given folder

  • return: root or wanted folder
  • access: public
Zend_Mail_Folder getFolders ([string $rootFolder = null])
  • string $rootFolder: get folder structure for given folder, else root

Implementation of:
Zend_Mail_Folder_Interface::getFolders()
get root folder or given folder
getHeader (line 115)

get a message with only header and $bodyLines lines of body

  • access: public
Zend_Mail_Message getHeader (int $id, int $bodyLines)
  • int $id: number of message
  • int $bodyLines: also retrieve this number of body lines

Redefinition of:
Zend_Mail_Abstract::getHeader()
Get a message with only header and $bodyLines lines of body
getMessage (line 101)

get a message with headers and body

  • access: public
Zend_Mail_Message getMessage (int $id)
  • int $id: number of message

Redefinition of:
Zend_Mail_Abstract::getMessage()
Get a message with headers and body
getSize (line 86)

get a list of messages with number and size

  • return: size of given message of list with all messages as array(num => size)
  • access: public
int|array getSize (int $id)
  • int $id: number of message

Redefinition of:
Zend_Mail_Abstract::getSize()
Get a list of messages with number and size
noop (line 192)

Keep the server busy.

  • access: public
void noop ()

Redefinition of:
Zend_Mail_Abstract::noop()
Keep the resource alive.
removeMessage (line 207)

Remove a message from server. If you're doing that from a web enviroment you should be careful and use a uniqueid as parameter if possible to identify the message.

  • access: public
void removeMessage (int $id)
  • int $id: number of message

Redefinition of:
Zend_Mail_Abstract::removeMessage()
delete a message from current box/folder
selectFolder (line 285)

select given folder

folder must be selectable!

  • access: public
  • throws: Zend_Mail_Exception
void selectFolder (Zend_Mail_Folder|string $globalName)
  • Zend_Mail_Folder|string $globalName: global name of folder or instance for subfolder

Implementation of:
Zend_Mail_Folder_Interface::selectFolder()
select given folder
__get (line 221)

Special handling for hasTop. The headers of the first message is retrieved if Top wasn't needed/tried yet.

  • access: public
  • see: Zend_Mail_Abstract:__get()
void __get ( $var)
  • $var

Redefinition of:
Zend_Mail_Abstract::__get()
Getter for has-properties. The standard has properties are: hasFolder, hasUniqueid, hasDelete, hasCreate, hasTop

Inherited Methods

Inherited From Zend_Mail_Abstract

 Zend_Mail_Abstract::__construct()
 Zend_Mail_Abstract::close()
 Zend_Mail_Abstract::count()
 Zend_Mail_Abstract::countMessages()
 Zend_Mail_Abstract::current()
 Zend_Mail_Abstract::getCapabilities()
 Zend_Mail_Abstract::getHeader()
 Zend_Mail_Abstract::getMessage()
 Zend_Mail_Abstract::getSize()
 Zend_Mail_Abstract::key()
 Zend_Mail_Abstract::next()
 Zend_Mail_Abstract::noop()
 Zend_Mail_Abstract::offsetExists()
 Zend_Mail_Abstract::offsetGet()
 Zend_Mail_Abstract::offsetSet()
 Zend_Mail_Abstract::offsetUnset()
 Zend_Mail_Abstract::removeMessage()
 Zend_Mail_Abstract::rewind()
 Zend_Mail_Abstract::seek()
 Zend_Mail_Abstract::valid()
 Zend_Mail_Abstract::__destruct()
 Zend_Mail_Abstract::__get()

Documentation generated on Thu, 18 Jan 2007 10:00:56 -0800 by phpDocumentor 1.3.1