Skip to content

Commit cee30e4

Browse files
committed
Default folder locations added
1 parent deab0ec commit cee30e4

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Updates should follow the [Keep a CHANGELOG](http://keepachangelog.com/) princip
1111
### Added
1212
- Search for messages by message-Id
1313
- Search for messages by In-Reply-To
14+
- Default folder locations added
1415

1516
### Affected Classes
1617
- [Query::class](src/Query/Query.php)

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ Detailed [config/imap.php](src/config/imap.php) configuration:
114114
- `fetch_flags` — If set to `false` all messages will be fetched without any flags
115115
- `message_key` — Message key identifier option
116116
- `fetch_order` — Message fetch order
117+
- `common_folders` — Default folder locations and paths assumed if none is provided
117118
- `open` — special configuration for imap_open()
118119
- `DISABLE_AUTHENTICATOR` — disable authentication properties.
119120
- `decoder` — Currently only the message and attachment decoder can be set

src/config/imap.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@
104104
| -Fetch order
105105
| 'asc' - Order all messages ascending (probably results in oldest first)
106106
| 'desc' - Order all messages descending (probably results in newest first)
107+
| -Common folders
108+
| Default folder locations and paths assumed if none is provided
107109
| -Open IMAP options:
108110
| DISABLE_AUTHENTICATOR - Disable authentication properties.
109111
| Use 'GSSAPI' if you encounter the following
@@ -122,6 +124,13 @@
122124
'fetch_flags' => true,
123125
'message_key' => 'list',
124126
'fetch_order' => 'asc',
127+
'common_folders' => [
128+
"root" => "INBOX",
129+
"junk" => "INBOX/Junk",
130+
"draft" => "INBOX/Drafts",
131+
"sent" => "INBOX/Sent",
132+
"trash" => "INBOX/Trash",
133+
],
125134
'open' => [
126135
// 'DISABLE_AUTHENTICATOR' => 'GSSAPI'
127136
],

0 commit comments

Comments
 (0)