@@ -96,6 +96,8 @@ Detailed [config/imap.php](src/config/imap.php) configuration:
9696 - ` options ` &mdash ; additional fetch options
9797 - ` delimiter ` &mdash ; you can use any supported char such as ".", "/", etc
9898 - ` 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
99101 - ` open ` &mdash ; special configuration for imap_open()
100102 - ` DISABLE_AUTHENTICATOR ` &mdash ; 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