@@ -96,6 +96,8 @@ Detailed [config/imap.php](src/config/imap.php) configuration:
96
96
- ` options ` &mdash ; additional fetch options
97
97
- ` delimiter ` &mdash ; you can use any supported char such as ".", "/", etc
98
98
- ` fetch ` &mdash ; ` FT_UID ` (message marked as read by fetching the message) or ` FT_PEEK ` (fetch the message without setting the "read" flag)
99
+ - ` fetch_body ` &mdash ; If set to ` false ` all messages will be fetched without the body and any potential attachments
100
+ - ` fetch_attachment ` &mdash ; If set to ` false ` all messages will be fetched without any attachments
99
101
- ` open ` &mdash ; special configuration for imap_open()
100
102
- ` DISABLE_AUTHENTICATOR ` &mdash ; Disable authentication properties.
101
103
@@ -254,7 +256,7 @@ $aAttachment->each(function ($oAttachment) {
254
256
});
255
257
```
256
258
257
- Fetch messages without body parsing (decrease load):
259
+ Fetch messages without body fetching (decrease load):
258
260
``` php
259
261
/** @var \Webklex\IMAP\Folder $oFolder */
260
262
@@ -265,6 +267,17 @@ $aMessage = $oFolder->searchMessages([['TEXT', 'Hello world']], null, false);
265
267
$aMessage = $oFolder->getMessages('ALL', null, false);
266
268
```
267
269
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
+
268
281
## Documentation
269
282
### [ Client::class] ( src/IMAP/Client.php )
270
283
| Method | Arguments | Return | Description |
0 commit comments