Skip to content

Commit

Permalink
php-imap core updated to v2.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Webklex committed Dec 21, 2020
1 parent 3325cb2 commit c9a872c
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 3 deletions.
51 changes: 50 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
16 changes: 15 additions & 1 deletion src/config/imap.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
]
],

/*
Expand Down Expand Up @@ -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
Expand All @@ -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:
Expand All @@ -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",
Expand Down

0 comments on commit c9a872c

Please sign in to comment.