Count messages all messages in current box
Parameters: | null – |
---|---|
Throws ExceptionRuntimeException: | |
Throws ZendMailProtocolExceptionRuntimeException: | |
Return type: | int number of messages |
get a list of messages with number and size
Parameters: | int – number of message |
---|---|
Return type: | int|array size of given message of list with all messages as array(num => size) |
Throws : | ZendMailProtocolExceptionRuntimeException |
Fetch a message
Parameters: | int – number of message |
---|---|
Return type: | ZendMailStorageMessage |
Throws : | ZendMailProtocolExceptionRuntimeException |
create instance with parameters Supported parameters 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 – mail reader specific parameters |
---|---|
Throws ExceptionRuntimeException: | |
Throws ExceptionInvalidArgumentException: | |
Throws ZendMailProtocolExceptionRuntimeException: | |
Close resource for mail lib. If you need to control, when the resource is closed. Otherwise the destructor would call this.
Keep the server busy.
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.
Parameters: | int – number of message |
---|---|
Throws ExceptionRuntimeException: | |
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 – message number |
---|---|
Return type: | array|string message number for given message or all messages as array |
Throws : | ZendMailProtocolExceptionRuntimeException |
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: | string – unique id |
---|---|
Throws ExceptionInvalidArgumentException: | |
Return type: | int message number |
get root folder or given folder
Parameters: | string – get folder structure for given folder, else root |
---|---|
Throws ExceptionRuntimeException: | |
Throws ExceptionInvalidArgumentException: | |
Throws ZendMailProtocolExceptionRuntimeException: | |
Return type: | ZendMailStorageFolder root or wanted folder |
select given folder
folder must be selectable!
Parameters: | ZendMailStorageFolder|string – global name of folder or instance for subfolder |
---|---|
Throws ExceptionRuntimeException: | |
Throws ZendMailProtocolExceptionRuntimeException: | |
get ZendMailStorageFolder instance for current folder
Return type: | ZendMailStorageFolder instance of current folder |
---|
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: |
|
---|---|
Throws ExceptionRuntimeException: | |
remove a folder
Parameters: | string|ZendMailStorageFolder – name or instance of folder |
---|---|
Throws ExceptionRuntimeException: | |
rename and/or move folder
The new name has the same restrictions as in createFolder()
Parameters: |
|
---|---|
Throws ExceptionRuntimeException: | |
append a new message to mail storage
Parameters: |
|
---|---|
Throws ExceptionRuntimeException: | |
copy an existing message
Parameters: |
|
---|---|
Throws ExceptionRuntimeException: | |