From c9a872c9767f0050d3e00bb8ca252c006c16600f Mon Sep 17 00:00:00 2001 From: Webklex Date: Mon, 21 Dec 2020 20:10:40 +0100 Subject: [PATCH] php-imap core updated to v2.3.0 --- CHANGELOG.md | 51 ++++++++++++++++++++++++++++++++++++++++++++- composer.json | 2 +- src/config/imap.php | 16 +++++++++++++- 3 files changed, 66 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 37ac1d4..d4d94ef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,13 +6,62 @@ Updates should follow the [Keep a CHANGELOG](http://keepachangelog.com/) princip ## [UNRELEASED] ### Fixed +- NaN + +### Added +- NaN + +### Breaking changes +- NaN + + +## [2.3.0] - 2020-12-21 +### Fixed - Missing env variable `IMAP_AUTHENTICATION` added +- Header decoding problem fixed +- IMAP::FT_PEEK removing "Seen" flag issue fixed +- Text/Html body fetched as attachment if subtype is null +- Potential header overwriting through header extensions +- Prevent empty attachments +- Search performance increased by fetching all headers, bodies and flags at once +- Legacy protocol support updated +- Fix Query pagination. (thanks [@mikemiller891](https://github.com/mikemiller891)) +- Missing array decoder method added (thanks [@lutchin](https://github.com/lutchin)) +- Additional checks added to prevent message from getting marked as seen +- Boundary parsing improved (thanks [@AntonioDiPassio-AppSys](https://github.com/AntonioDiPassio-AppSys)) +- Idle operation updated +- Cert validation issue fixed +- Allow boundaries ending with a space or semicolon (thanks [@smartilabs](https://github.com/smartilabs)) +- Ignore IMAP DONE command response +- Default `options.fetch` set to `IMAP::FT_PEEK` +- Address parsing fixed +- Alternative rfc822 header parsing fixed +- Parse more than one header key +- Fetch folder overview fixed +- `Message::getTextBody()` fallback value fixed ### Added - Default folder locations added +- Search for messages by message-Id +- Search for messages by In-Reply-To +- Message threading added `Message::thread()` +- Default folder locations added +- Set fetch order during query [@Max13](https://github.com/Max13) +- Missing message setter methods added +- `Folder::overview()` method added to fetch all headers of all messages in the current folder +- Force a folder to be opened +- Proxy support added +- Flexible disposition support added +- New `options.message_key` option `uid` added +- Protocol UID support added +- Flexible sequence type support added ### Breaking changes -- NaN +- Depending on your configuration, your certificates actually get checked. Which can cause an aborted connection if the certificate can not be validated. +- Messages don't get flagged as read unless you are using your own custom config. +- All `Header::class` attribute keys are now in a snake_format and no longer minus-separated. +- `Message::getTextBody()` no longer returns false if no text body is present. `null` is returned instead. + ## [2.2.0] - 2020-10-16 ### Fixed diff --git a/composer.json b/composer.json index 948858c..0d06259 100644 --- a/composer.json +++ b/composer.json @@ -26,7 +26,7 @@ "ext-mbstring": "*", "ext-iconv": "*", "ext-fileinfo": "*", - "webklex/php-imap": "^2.2", + "webklex/php-imap": "^2.3", "laravel/framework": ">=5.0.0" }, "autoload": { diff --git a/src/config/imap.php b/src/config/imap.php index 08eb5cd..1834b76 100644 --- a/src/config/imap.php +++ b/src/config/imap.php @@ -55,6 +55,12 @@ 'username' => env('IMAP_USERNAME', 'root@example.com'), 'password' => env('IMAP_PASSWORD', ''), 'authentication' => env('IMAP_AUTHENTICATION', null), + 'proxy' => [ + 'socket' => null, + 'request_fulluri' => false, + 'username' => null, + 'password' => null, + ] ], /* @@ -92,6 +98,9 @@ | -Fetch option: | IMAP::FT_UID - Message marked as read by fetching the message body | IMAP::FT_PEEK - Fetch the message without setting the "seen" flag + | -Fetch sequence id: + | IMAP::ST_UID - Fetch message components using the message uid + | IMAP::ST_MSGN - Fetch message components using the message number | -Body download option | Default TRUE | -Flag download option @@ -101,9 +110,12 @@ | 'id' - Use the MessageID as array key (default, might cause hickups with yahoo mail) | 'number' - Use the message number as array key (isn't always unique and can cause some interesting behavior) | 'list' - Use the message list number as array key (incrementing integer (does not always start at 0 or 1) + | 'uid' - Use the message uid as array key (isn't always unique and can cause some interesting behavior) | -Fetch order | 'asc' - Order all messages ascending (probably results in oldest first) | 'desc' - Order all messages descending (probably results in newest first) + | -Disposition types potentially considered an attachment + | Default ['attachment', 'inline'] | -Common folders | Default folder locations and paths assumed if none is provided | -Open IMAP options: @@ -119,11 +131,13 @@ */ 'options' => [ 'delimiter' => '/', - 'fetch' => \Webklex\PHPIMAP\IMAP::FT_UID, + 'fetch' => \Webklex\PHPIMAP\IMAP::FT_PEEK, + 'sequence' => \Webklex\PHPIMAP\IMAP::ST_MSGN, 'fetch_body' => true, 'fetch_flags' => true, 'message_key' => 'list', 'fetch_order' => 'asc', + 'dispositions' => ['attachment', 'inline'], 'common_folders' => [ "root" => "INBOX", "junk" => "INBOX/Junk",