diff --git a/CHANGELOG.md b/CHANGELOG.md index 8ac145e..712d8fd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,13 +6,23 @@ Updates should follow the [Keep a CHANGELOG](http://keepachangelog.com/) princip ## [UNRELEASED] +## [1.0.2.8] - 2017-06-25 +### Added +-Message attribute is now case insensitive +-Readme file extended +-Changelog typo fixed + +### Affected Classes +\Webklex\IMAP\Message + + ## [1.0.2.7] - 2017-04-23 ### Added -imap_fetchheader(): Bad message number - merged -Changed the default options in imap_fetchbody function - merged -Attachment handling fixed (Plain text files are no longer ignored) -Optional config parameter added. --Readme file extened +-Readme file extended ### Changes \Webklex\IMAP\Client @@ -24,7 +34,7 @@ Updates should follow the [Keep a CHANGELOG](http://keepachangelog.com/) princip ### Added -Code commented -A whole bunch of functions and features added. To many to mention all of them ;) --Readme file extened +-Readme file extended ### Changes \Webklex\IMAP\Client diff --git a/README.md b/README.md index 06c5980..f48917d 100644 --- a/README.md +++ b/README.md @@ -133,7 +133,7 @@ You can define your accounts inside the `config/imap.php` file: ``` ## Documentation -### \Webklex\IMAP\Client +### [Client::class](src/IMAP/Client.php) | Method | Arguments | Return | Description | | --------------------- | ------------------------------------------------- | :-----: | ---------------------------------------------------------------------------------------------------------------------------- | | setConfig | array $config | self | Set the Client configuration. Take a look at `config/imap.php` for more inspiration. | @@ -157,7 +157,7 @@ You can define your accounts inside the `config/imap.php` file: | expunge | | bool | Delete all messages marked for deletion | | checkCurrentMailbox | | object | Check current mailbox | -### \Webklex\IMAP\Message +### [Message::class](src/IMAP/Message.php) | Method | Arguments | Return | Description | | -------------- | ----------------------------- | :---------: | -------------------------------------- | | delete | | | Delete the current Message | @@ -171,7 +171,7 @@ You can define your accounts inside the `config/imap.php` file: | getHTMLBody | | string | Get the Message html body | | getAttachments | | collection | Get all message attachments | -### \Webklex\IMAP\Folder +### [Folder::class](src/IMAP/Folder.php) | Method | Arguments | Return | Description | | ------------- | ------------------------------------------------------- | :-----: | ---------------------------------------------- | | hasChildren | | bool | Determine if folder has children. | diff --git a/src/IMAP/Message.php b/src/IMAP/Message.php index 20ca8bb..47ca9af 100644 --- a/src/IMAP/Message.php +++ b/src/IMAP/Message.php @@ -411,7 +411,7 @@ protected function fetchAttachment($structure, $partNumber){ $attachment->name = false; if (property_exists($structure, 'dparameters')) { foreach ($structure->dparameters as $parameter) { - if ($parameter->attribute == "filename") { + if (strtolower($parameter->attribute) == "filename") { $attachment->name = $parameter->value; break; } @@ -420,7 +420,7 @@ protected function fetchAttachment($structure, $partNumber){ if (!$attachment->name && property_exists($structure, 'parameters')) { foreach ($structure->parameters as $parameter) { - if ($parameter->attribute == "name") { + if (strtolower($parameter->attribute) == "name") { $attachment->name = $parameter->value; break; } @@ -495,7 +495,7 @@ private function convertEncoding($str, $from = "ISO-8859-2", $to = "UTF-8") { private function getEncoding($structure) { if (property_exists($structure, 'parameters')) { foreach ($structure->parameters as $parameter) { - if ($parameter->attribute == "charset") { + if (strtolower($parameter->attribute) == "charset") { return strtoupper($parameter->value); } }