create a new maildir
If the given dir is already a valid maildir this will not fail.
Parameters: | string – directory for the new maildir (may already exist) |
---|---|
Throws ZendMailStorageExceptionRuntimeException: | |
Throws ZendMailStorageExceptionInvalidArgumentException: | |
Create instance with parameters Additional parameters are (see parent for more):
- create if true a new maildir is create if none exists
Parameters: | $params – mail reader specific parameters |
---|---|
Throws ZendMailStorageExceptionExceptionInterface: | |
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 ZendMailStorageExceptionRuntimeException: | |
Return type: | string only used internally (new created maildir) |
remove a folder
Parameters: | string|Folder – name or instance of folder |
---|---|
Throws ZendMailStorageExceptionRuntimeException: | |
rename and/or move folder
The new name has the same restrictions as in createFolder()
Parameters: |
|
---|---|
Throws ZendMailStorageExceptionRuntimeException: | |
create a uniqueid for maildir filename
This is nearly the format defined in the maildir standard. The microtime() call should already create a uniqueid, the pid is for multicore/-cpu machine that manage to call this function at the exact same time, and uname() gives us the hostname for multiple machines accessing the same storage.
If someone disables posix we create a random number of the same size, so this method should also work on Windows - if you manage to get maildir working on Windows. Microtime could also be disabled, although I’ve never seen it.
Return type: | string new uniqueid |
---|
open a temporary maildir file
makes sure tmp/ exists and create a file with a unique name you should close the returned filehandle!
Parameters: | string – name of current folder without leading . |
---|---|
Throws ZendMailStorageExceptionRuntimeException: | |
Return type: | array array(‘dirname’ => dir of maildir folder, ‘uniq’ => unique id, ‘filename’ => name of create file ‘handle’ => file opened for writing) |
create an info string for filenames with given flags
Parameters: | array – wanted flags, with the reference you’ll get the set flags with correct key (= char for flag) |
---|---|
Throws ZendMailStorageExceptionInvalidArgumentException: | |
Return type: | string info string for version 2 filenames including the leading colon |
append a new message to mail storage
Parameters: |
|
---|---|
Throws ZendMailStorageExceptionRuntimeException: | |
copy an existing message
Parameters: |
|
---|---|
Throws ZendMailStorageExceptionRuntimeException: | |
move an existing message
Parameters: |
|
---|---|
Throws ZendMailStorageExceptionRuntimeException: | |
set flags for message
NOTE: this method can’t set the recent flag.
Parameters: |
|
---|---|
Throws ZendMailStorageExceptionRuntimeException: | |
stub for not supported message deletion
Parameters: | $id – |
---|---|
Throws ZendMailStorageExceptionRuntimeException: | |
enable/disable quota and set a quota value if wanted or needed
You can enable/disable quota with true/false. If you don’t have a MDA or want to enforce a quota value you can also set this value here. Use array(‘size’ => SIZE_QUOTA, ‘count’ => MAX_MESSAGE) do define your quota. Order of these fields does matter!
Parameters: | bool|array – new quota value |
---|
get currently set quota
Parameters: | bool – |
---|---|
Throws ZendMailStorageExceptionRuntimeException: | |
Return type: | bool|array |
@see http://www.inter7.com/courierimap/README.maildirquota.html “Calculating maildirsize”
Return type: | array |
---|
@see http://www.inter7.com/courierimap/README.maildirquota.html “Calculating the quota for a Maildir++”
Parameters: | bool – |
---|---|
Return type: | array |