File tree Expand file tree Collapse file tree 1 file changed +26
-2
lines changed
Expand file tree Collapse file tree 1 file changed +26
-2
lines changed Original file line number Diff line number Diff line change @@ -322,8 +322,32 @@ public function openFolder(Folder $folder, $attempts = 3) {
322322 */
323323 public function createFolder ($ name ) {
324324 $ this ->checkConnection ();
325-
326- return imap_createmailbox ($ this ->connection , imap_utf7_encode ($ name ));
325+ return imap_createmailbox ($ this ->connection , $ this ->getAddress () . imap_utf7_encode ($ name ));
326+ }
327+
328+ /**
329+ * Rename Folder
330+ * @param string $old_name
331+ * @param string $new_name
332+ *
333+ * @return bool
334+ * @throws ConnectionFailedException
335+ */
336+ public function renameFolder ($ old_name , $ new_name ) {
337+ $ this ->checkConnection ();
338+ return imap_renamemailbox ($ this ->connection , $ this ->getAddress () . imap_utf7_encode ($ old_name ), $ this ->getAddress () . imap_utf7_encode ($ new_name ));
339+ }
340+
341+ /**
342+ * Delete Folder
343+ * @param string $name
344+ *
345+ * @return bool
346+ * @throws ConnectionFailedException
347+ */
348+ public function deleteFolder ($ name ) {
349+ $ this ->checkConnection ();
350+ return imap_deletemailbox ($ this ->connection , $ this ->getAddress () . imap_utf7_encode ($ name ));
327351 }
328352
329353 /**
You can’t perform that action at this time.
0 commit comments