@@ -983,6 +983,7 @@ protected function fetchThreadByMessageId(MessageCollection &$thread, string $me
983
983
* Copy the current Messages to a mailbox
984
984
* @param string $folder_path
985
985
* @param boolean $expunge
986
+ * @param bool $utf7
986
987
*
987
988
* @return null|Message
988
989
* @throws AuthFailedException
@@ -999,7 +1000,7 @@ protected function fetchThreadByMessageId(MessageCollection &$thread, string $me
999
1000
* @throws RuntimeException
1000
1001
* @throws ResponseException
1001
1002
*/
1002
- public function copy (string $ folder_path , bool $ expunge = false ): ?Message {
1003
+ public function copy (string $ folder_path , bool $ expunge = false , bool $ utf7 = false ): ?Message {
1003
1004
$ this ->client ->openFolder ($ folder_path );
1004
1005
$ status = $ this ->client ->getConnection ()->examineFolder ($ folder_path )->validatedData ();
1005
1006
@@ -1010,7 +1011,7 @@ public function copy(string $folder_path, bool $expunge = false): ?Message {
1010
1011
}
1011
1012
1012
1013
/** @var Folder $folder */
1013
- $ folder = $ this ->client ->getFolderByPath ($ folder_path );
1014
+ $ folder = $ this ->client ->getFolderByPath ($ folder_path, $ utf7 );
1014
1015
1015
1016
$ this ->client ->openFolder ($ this ->folder_path );
1016
1017
if ($ this ->client ->getConnection ()->copyMessage ($ folder ->path , $ this ->getSequenceId (), null , $ this ->sequence )->validatedData ()) {
@@ -1025,6 +1026,7 @@ public function copy(string $folder_path, bool $expunge = false): ?Message {
1025
1026
* Move the current Messages to a mailbox
1026
1027
* @param string $folder_path
1027
1028
* @param boolean $expunge
1029
+ * @param bool $utf7
1028
1030
*
1029
1031
* @return Message|null
1030
1032
* @throws AuthFailedException
@@ -1041,7 +1043,7 @@ public function copy(string $folder_path, bool $expunge = false): ?Message {
1041
1043
* @throws RuntimeException
1042
1044
* @throws ResponseException
1043
1045
*/
1044
- public function move (string $ folder_path , bool $ expunge = false ): ?Message {
1046
+ public function move (string $ folder_path , bool $ expunge = false , bool $ utf7 = false ): ?Message {
1045
1047
$ this ->client ->openFolder ($ folder_path );
1046
1048
$ status = $ this ->client ->getConnection ()->examineFolder ($ folder_path )->validatedData ();
1047
1049
@@ -1052,7 +1054,7 @@ public function move(string $folder_path, bool $expunge = false): ?Message {
1052
1054
}
1053
1055
1054
1056
/** @var Folder $folder */
1055
- $ folder = $ this ->client ->getFolderByPath ($ folder_path );
1057
+ $ folder = $ this ->client ->getFolderByPath ($ folder_path, $ utf7 );
1056
1058
1057
1059
$ this ->client ->openFolder ($ this ->folder_path );
1058
1060
if ($ this ->client ->getConnection ()->moveMessage ($ folder ->path , $ this ->getSequenceId (), null , $ this ->sequence )->validatedData ()) {
0 commit comments