Fully Qualified Name: | Zend\Mail\Storage\Imap |
Extends: | AbstractStorage |
Implements: | FolderInterface, WritableInterface |
Name | Description | Defined By |
---|---|---|
__construct() | create instance with parameters | Imap |
__destruct() | Destructor calls close() and therefore closes the resource. | AbstractStorage |
__get() | Getter for has-properties. The standard has properties are: hasFolder, hasUniqueid, hasDelete, hasCreate, hasTop | AbstractStorage |
appendMessage() | append a new message to mail storage | Imap |
close() | Close resource for mail lib. | Imap |
copyMessage() | copy an existing message | Imap |
count() | Countable::count() | AbstractStorage |
countMessages() | Count messages all messages in current box | Imap |
createFolder() | create a new folder | Imap |
current() | Iterator::current() | AbstractStorage |
delimiter() | get IMAP delimiter | Imap |
getCapabilities() | Get a full list of features supported by the specific mail lib and the server | AbstractStorage |
getCurrentFolder() | get Folder instance for current folder | Imap |
getFolders() | get root folder or given folder | Imap |
getMessage() | Fetch a message | Imap |
getNumberByUniqueId() | get a message number from a unique id | Imap |
getRawContent() | Imap | |
getRawHeader() | Imap | |
getSize() | get a list of messages with number and size | Imap |
getUniqueId() | get unique id for one or all messages | Imap |
key() | Iterator::key() | AbstractStorage |
moveMessage() | move an existing message | Imap |
next() | Iterator::next() | AbstractStorage |
noop() | Keep the server busy. | Imap |
offsetExists() | ArrayAccess::offsetExists() | AbstractStorage |
offsetGet() | ArrayAccess::offsetGet() | AbstractStorage |
offsetSet() | ArrayAccess::offsetSet() | AbstractStorage |
offsetUnset() | ArrayAccess::offsetUnset() | AbstractStorage |
removeFolder() | remove a folder | Imap |
removeMessage() | Remove a message from server. | Imap |
renameFolder() | rename and/or move folder | Imap |
rewind() | Iterator::rewind() | AbstractStorage |
seek() | SeekableIterator::seek() | AbstractStorage |
selectFolder() | select given folder | Imap |
setFlags() | set flags for message | Imap |
valid() | Iterator::valid() | AbstractStorage |
create instance with parameters
Supported parameters are
Parameter Name | Type | Description |
---|---|---|
$params | array |
Returns:
Destructor calls close() and therefore closes the resource.
Returns:
Getter for has-properties. The standard has properties are: hasFolder, hasUniqueid, hasDelete, hasCreate, hasTop
The valid values for the has-properties are:
Parameter Name | Type | Description |
---|---|---|
$var | string | property |
Returns: bool supported or not
append a new message to mail storage
Parameter Name | Type | Description |
---|---|---|
$message | string | message |
$folder | null|string|\Folder | folder |
$flags | null|array | set |
Returns:
Close resource for mail lib.
If you need to control, when the resource is closed. Otherwise the destructor would call this.
Returns:
copy an existing message
Parameter Name | Type | Description |
---|---|---|
$id | int | number |
$folder | string|\Folder | name |
Returns:
Countable::count()
Returns: int
Count messages all messages in current box
Parameter Name | Type | Description |
---|---|---|
$flags | null |
Returns: int number of messages
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
Parameter Name | Type | Description |
---|---|---|
$name | string | global |
$parentFolder | string|\Folder | parent |
Returns:
Iterator::current()
Returns: \Message current message
get IMAP delimiter
Returns: string|null
Get a full list of features supported by the specific mail lib and the server
Returns: array list of features as array(feature_name => true|false[|null])
get Folder instance for current folder
Returns: \Folder instance of current folder
get root folder or given folder
Parameter Name | Type | Description |
---|---|---|
$rootFolder | string | get |
Returns: \Folder root or wanted folder
Fetch a message
Parameter Name | Type | Description |
---|---|---|
$id | int | number |
Returns: \Message
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()
Parameter Name | Type | Description |
---|---|---|
$id | string | unique |
Returns: int message number
Parameter Name | Type | Description |
---|---|---|
$id | ||
$part |
Returns: void
Parameter Name | Type | Description |
---|---|---|
$id | ||
$part | ||
$topLines |
Returns: void
get a list of messages with number and size
Parameter Name | Type | Description |
---|---|---|
$id | int | number |
Returns: int|array size of given message of list with all messages as [num => size]
get unique id for one or all messages
if storage does not support unique ids it's the same as the message number.
Parameter Name | Type | Description |
---|---|---|
$id | int|null | message |
Returns: array|string message number for given message or all messages as array
Iterator::key()
Returns: int id of current position
move an existing message
NOTE: IMAP has no native move command, thus it's emulated with copy and delete
Parameter Name | Type | Description |
---|---|---|
$id | int | number |
$folder | string|\Folder | name |
Returns:
Iterator::next()
Returns:
Keep the server busy.
Returns:
ArrayAccess::offsetExists()
Parameter Name | Type | Description |
---|---|---|
$id | int |
Returns: bool
ArrayAccess::offsetGet()
Parameter Name | Type | Description |
---|---|---|
$id | int |
Returns: \Zend\Mail\Storage\Message message object
ArrayAccess::offsetSet()
Parameter Name | Type | Description |
---|---|---|
$id | mixed | |
$value | mixed |
Returns:
ArrayAccess::offsetUnset()
Parameter Name | Type | Description |
---|---|---|
$id | int |
Returns: bool success
remove a folder
Parameter Name | Type | Description |
---|---|---|
$name | string|\Folder | name |
Returns:
Remove a message from server.
If you're doing that from a web environment you should be careful and use a uniqueid as parameter if possible to identify the message.
Parameter Name | Type | Description |
---|---|---|
$id | int | number |
Returns:
rename and/or move folder
The new name has the same restrictions as in createFolder()
Parameter Name | Type | Description |
---|---|---|
$oldName | string|\Folder | name |
$newName | string | new |
Returns:
Iterator::rewind()
Rewind always gets the new count from the storage. Thus if you use the interfaces and your scripts take long you should use reset() from time to time.
Returns:
SeekableIterator::seek()
Parameter Name | Type | Description |
---|---|---|
$pos | int |
Returns:
select given folder
folder must be selectable!
Parameter Name | Type | Description |
---|---|---|
$globalName | \Folder|string | global |
Returns:
set flags for message
NOTE: this method can't set the recent flag.
Parameter Name | Type | Description |
---|---|---|
$id | int | number |
$flags | array | new |
Returns:
Iterator::valid()
Returns: bool