File tree Expand file tree Collapse file tree 2 files changed +28
-0
lines changed
Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -221,6 +221,30 @@ public function disconnect() {
221221 return $ this ;
222222 }
223223
224+ /**
225+ * Get a folder instance by a folder name
226+ * -------------------------------------------------------
227+ * PLEASE NOTE: This is a completely experimental function
228+ * -------------------------------------------------------
229+ * @param string $folder_name
230+ * @param int $attributes
231+ * @param null|string $delimiter
232+ *
233+ * @return Folder
234+ */
235+ public function getFolder ($ folder_name , $ attributes = 32 , $ delimiter = null ){
236+
237+ $ delimiter = $ delimiter == null ? config ('imap.options.delimiter ' , '/ ' ) : $ delimiter ;
238+
239+ $ oFolder = new Folder ($ this , (object )[
240+ 'name ' => $ this ->getAddress ().$ folder_name ,
241+ 'attributes ' => $ attributes ,
242+ 'delimiter ' => $ delimiter
243+ ]);
244+
245+ return $ oFolder ;
246+ }
247+
224248 /**
225249 * Get folders list.
226250 * If hierarchical order is set to true, it will make a tree of folders, otherwise it will return flat array.
Original file line number Diff line number Diff line change 6969 |--------------------------------------------------------------------------
7070 |
7171 | Available php imap config parameters are listed below
72+ | -Delimiter (optional):
73+ | This option is only used wehen calling $oClient->
74+ | You can use any supported char such as ".", "/", (...)
7275 | -Fetch option:
7376 | FT_UID - Message marked as read by fetching the message
7477 | FT_PEEK - Fetch the message without setting the "read" flag
8083 |
8184 */
8285 'options ' => [
86+ 'delimiter ' => '/ ' ,
8387 'fetch ' => FT_UID ,
8488 'open ' => [
8589 // 'DISABLE_AUTHENTICATOR' => 'GSSAPI'
You can’t perform that action at this time.
0 commit comments