Public Member Functions |
| countMessages ($flags=null) |
| getSize ($id=0) |
| getMessage ($id) |
| getRawHeader ($id, $part=null, $topLines=0) |
| getRawContent ($id, $part=null) |
| __construct ($params) |
| close () |
| noop () |
| removeMessage ($id) |
| getUniqueId ($id=null) |
| getNumberByUniqueId ($id) |
| getFolders ($rootFolder=null) |
| selectFolder ($globalName) |
| getCurrentFolder () |
| createFolder ($name, $parentFolder=null) |
| removeFolder ($name) |
| renameFolder ($oldName, $newName) |
| appendMessage ($message, $folder=null, $flags=null) |
| copyMessage ($id, $folder) |
| moveMessage ($id, $folder) |
| setFlags ($id, $flags) |
Protected Attributes |
| $_protocol |
| $_currentFolder = '' |
Static Protected Attributes |
static | $_knownFlags |
static | $_searchFlags |
Detailed Description
Definition at line 66 of file Imap.php.
Constructor & Destructor Documentation
create instance with parameters Supported paramters are
- user username
- host hostname or ip address of IMAP server [optional, default = 'localhost']
- 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']
- Parameters:
-
array | $params | mail reader specific parameters |
- Exceptions:
-
- See also:
- Zend_Mail_Storage_Exception
-
Zend_Mail_Storage_Exception
-
Zend_Mail_Storage_Exception
Reimplemented from Zend_Mail_Storage_Abstract.
Definition at line 237 of file Imap.php.
Member Function Documentation
appendMessage |
( |
$ |
message, |
|
|
$ |
folder = null , |
|
|
$ |
flags = null |
|
) |
| |
Close resource for mail lib. If you need to control, when the resource is closed. Otherwise the destructor would call this.
- Returns:
- null
Reimplemented from Zend_Mail_Storage_Abstract.
Definition at line 290 of file Imap.php.
copyMessage |
( |
$ |
id, |
|
|
$ |
folder |
|
) |
| |
countMessages |
( |
$ |
flags = null ) |
|
createFolder |
( |
$ |
name, |
|
|
$ |
parentFolder = null |
|
) |
| |
create a new folder
This method also creates parent folders if necessary. Some mail storages may restrict, which folder may be used as parent or which chars may be used in the folder name
- Parameters:
-
string | $name | global name of folder, local name if $parentFolder is set |
string | Zend_Mail_Storage_Folder | $parentFolder | parent folder for new folder, else root folder is parent |
- Returns:
- null
- Exceptions:
-
- See also:
- Zend_Mail_Storage_Exception
Implements Zend_Mail_Storage_Writable_Interface.
Definition at line 494 of file Imap.php.
getFolders |
( |
$ |
rootFolder = null ) |
|
getNumberByUniqueId |
( |
$ |
id ) |
|
get a message number from a unique id
I.e. if you have a webmailer that supports deleting messages you should use unique ids as parameter and use this method to translate it to message number right before calling removeMessage()
- Parameters:
-
- Returns:
- int message number
- Exceptions:
-
- See also:
- Zend_Mail_Storage_Exception
Reimplemented from Zend_Mail_Storage_Abstract.
Definition at line 369 of file Imap.php.
getRawContent |
( |
$ |
id, |
|
|
$ |
part = null |
|
) |
| |
getRawHeader |
( |
$ |
id, |
|
|
$ |
part = null , |
|
|
$ |
topLines = 0 |
|
) |
| |
Get raw header of message or part
- Parameters:
-
int | $id | number of message |
null | array | string | $part | path to part or null for messsage header |
int | $topLines | include this many lines with header (after an empty line) |
- Returns:
- string raw header
- See also:
- Zend_Mail_Storage_Exception
Reimplemented from Zend_Mail_Storage_Abstract.
Definition at line 185 of file Imap.php.
get a list of messages with number and size
- Parameters:
-
- Returns:
- int|array size of given message of list with all messages as array(num => size)
- Exceptions:
-
Reimplemented from Zend_Mail_Storage_Abstract.
Definition at line 146 of file Imap.php.
getUniqueId |
( |
$ |
id = null ) |
|
get unique id for one or all messages
if storage does not support unique ids it's the same as the message number
- Parameters:
-
int | null | $id | message number |
- Returns:
- array|string message number for given message or all messages as array
- Exceptions:
-
Reimplemented from Zend_Mail_Storage_Abstract.
Definition at line 350 of file Imap.php.
moveMessage |
( |
$ |
id, |
|
|
$ |
folder |
|
) |
| |
renameFolder |
( |
$ |
oldName, |
|
|
$ |
newName |
|
) |
| |
selectFolder |
( |
$ |
globalName ) |
|
setFlags |
( |
$ |
id, |
|
|
$ |
flags |
|
) |
| |
Field Documentation
$_knownFlags [static, protected] |
Initial value: array('\Passed' => Zend_Mail_Storage::FLAG_PASSED,
'\Answered' => Zend_Mail_Storage::FLAG_ANSWERED,
'\Seen' => Zend_Mail_Storage::FLAG_SEEN,
'\Deleted' => Zend_Mail_Storage::FLAG_DELETED,
'\Draft' => Zend_Mail_Storage::FLAG_DRAFT,
'\Flagged' => Zend_Mail_Storage::FLAG_FLAGGED)
Definition at line 88 of file Imap.php.
$_searchFlags [static, protected] |
Initial value: array('\Recent' => 'RECENT',
'\Answered' => 'ANSWERED',
'\Seen' => 'SEEN',
'\Deleted' => 'DELETED',
'\Draft' => 'DRAFT',
'\Flagged' => 'FLAGGED')
Definition at line 99 of file Imap.php.
The documentation for this class was generated from the following file:
- E:/E/GEAMP/www/openbiz/openbiz/others/Zend/Mail/Storage/Imap.php