File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 88use DirectoryTree \ImapEngine \Exceptions \Exception ;
99use DirectoryTree \ImapEngine \Exceptions \ImapCapabilityException ;
1010use Illuminate \Contracts \Support \Arrayable ;
11+ use Illuminate \Support \ItemNotFoundException ;
1112use JsonSerializable ;
1213
1314class Folder implements Arrayable, JsonSerializable
@@ -115,8 +116,12 @@ function (int $msgn) use ($callback, $fetch) {
115116
116117 try {
117118 $ message = $ fetch ($ msgn );
119+ } catch (ItemNotFoundException ) {
120+ // The message wasn't found. We will skip
121+ // it and continue awaiting new messages.
122+ return ;
118123 } catch (Exception ) {
119- // If fetching the message fails, we'll attempt
124+ // Something else happened. We will attempt
120125 // reconnecting and re-fetching the message.
121126 $ this ->mailbox ->reconnect ();
122127
You can’t perform that action at this time.
0 commit comments