Skip to content

Commit 31ad28a

Browse files
committed
new config options documented
1 parent 9f2c413 commit 31ad28a

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

README.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@ Detailed [config/imap.php](src/config/imap.php) configuration:
9696
- `options` — additional fetch options
9797
- `delimiter` — you can use any supported char such as ".", "/", etc
9898
- `fetch` — `FT_UID` (message marked as read by fetching the message) or `FT_PEEK` (fetch the message without setting the "read" flag)
99+
- `fetch_body` — If set to `false` all messages will be fetched without the body and any potential attachments
100+
- `fetch_attachment` — If set to `false` all messages will be fetched without any attachments
99101
- `open` — special configuration for imap_open()
100102
- `DISABLE_AUTHENTICATOR` — Disable authentication properties.
101103

@@ -254,7 +256,7 @@ $aAttachment->each(function ($oAttachment) {
254256
});
255257
```
256258

257-
Fetch messages without body parsing (decrease load):
259+
Fetch messages without body fetching (decrease load):
258260
``` php
259261
/** @var \Webklex\IMAP\Folder $oFolder */
260262

@@ -265,6 +267,17 @@ $aMessage = $oFolder->searchMessages([['TEXT', 'Hello world']], null, false);
265267
$aMessage = $oFolder->getMessages('ALL', null, false);
266268
```
267269

270+
Fetch messages without body and attachment fetching (decrease load):
271+
``` php
272+
/** @var \Webklex\IMAP\Folder $oFolder */
273+
274+
/** @var \Webklex\IMAP\Support\MessageCollection $aMessage */
275+
$aMessage = $oFolder->searchMessages([['TEXT', 'Hello world']], null, false, 'UTF-8', false);
276+
277+
/** @var \Webklex\IMAP\Support\MessageCollection $aMessage */
278+
$aMessage = $oFolder->getMessages('ALL', null, false, false);
279+
```
280+
268281
## Documentation
269282
### [Client::class](src/IMAP/Client.php)
270283
| Method | Arguments | Return | Description |

0 commit comments

Comments
 (0)