NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist · #1320 most downloaded on Packagist
Laravel IMAP client
Last release 1 years ago
25 Apr 2025
Release timing varies
gaps range from 2 weeks to 1.6 years
Nearly every release is documented
notes for 59 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
10 years old
83 releases · first in 2017
When using the chunk function, some messages do not have an element with index 0 (thanks @zeddmaster )
One column per quarter.
Filename sanitization is now optional (enabled via default)
Client::clone() looses account configuration (thanks @netpok)Fix implicit marking of parameters as nullable, deprecated in PHP8.4 (thanks @campbell-m )
ImapProtocol::readResponseClient::getFolderPath() return null if folder is not set (thanks @arnolem)Folder::status() (thanks @InterLinked1)Config::class to allow class serialization (sponsored by elb-BIT GmbH)Folder::getStatus() no longer returns the results of EXAMINE but STATUS instead. If you want to use EXAMINE you can use the Folder::examine() method instead.ClientManager::class has now longer access to all configs. Config handling has been moved to its own class Config::class. If you want to access the config you can use the retriever method ::getConfig() instead. Example: $client->getConfig() or $message->getConfig(), etc.ClientManager::get isn't available anymore. Use the regular config accessor instead. Example: $cm->getConfig()M̀essage::getConfig() now returns the client configuration instead of the fetching options configuration. Please use $message->getOptions() instead.Attachment::getConfig() now returns the client configuration instead of the fetching options configuration. Please use $attachment->getOptions() instead.Header::getConfig() now returns the client configuration instead of the fetching options configuration. Please use $header->getOptions() instead.M̀essage::setConfig now expects the client configuration instead of the fetching options configuration. Please use $message->setOptions instead.Attachment::setConfig now expects the client configuration instead of the fetching options configuration. Please use $attachment->setOptions instead.Header::setConfig now expects the client configuration instead of the fetching options configuration. Please use $header->setOptions instead.Config::class instanceClient::class constructors now require a Config::class instancePart::class constructors now require a Config::class instanceHeader::class constructors now require a Config::class instanceMessage::fromFile method now requires a Config::class instanceMessage::fromString method now requires a Config::class instanceMessage::boot method now requires a Config::class instanceIf you are using this method without providing a sanitized path, you are affected by this vulnerability. If you are not using this method or are provi…
Impacted are all versions below v5.3.0.
If possible, update to >= v5.3.0 as soon as possible. Impacted was the Attachment::save
method which could be used to write files to the local filesystem. The path was not
properly sanitized and could be used to write files to arbitrary locations.
However, the Attachment::save method is not used by default and has to be called
manually. If you are using this method without providing a sanitized path, you are
affected by this vulnerability.
If you are not using this method or are providing a sanitized path, you are not affected
by this vulnerability and no immediate action is required.
If you have any questions, please feel welcome to join this issue: Webklex/php-imap#416
The message uid and message number will only be fetched if accessed and wasn't previously set (thanks @szymekjanaczek )
ImapProtocol::logout always throws 'not connected' Exception after upgraded to 4.1.2Message::setConfig() config parameter type set to arrayIMAP::FT_PEEKMessage::is() date comparison fixedMessage::$client could not be set to nullin_reply_to and references parsing fixedMessage::hasTextBody() and Message::hasHtmlBody() should return false if the body is emptyiconv_mime_decode() is now used with ICONV_MIME_DECODE_CONTINUE_ON_ERROR to prevent the decoding from failing$total attribute value set to 0 (thanks @hhniao)LIST command response to be emptyClient::clone() method added to clone a client instanceMessage::save()Message::fromFile()Protocol::getStream()Protocol::meta()ImapProtocol::reset()Response::class introduced to handle and unify all protocol requestsClientManager::getMask() addedAttribute::class instance can be treated as arrayClient::getConfig()Client::deleteFolder()Protocol::sizes() support added (fetch the message byte size via RFC822.SIZE). Accessible through Message::getSize() (thanks @didi1357)Message::hasFlag() method added to check if a message has a specific flagMessage::getConfig() method added to get the current message configurationFolder::select() method added to select a folderMessage::getAvailableFlags() method added to get all available flagsAttribute::map() method added to map all attribute valuesHeader::has() method added to check if a header attribute / value existMessage::fromString()nesbot/carbon version bumped to ^2.62.1phpunit/phpunit version bumped to ^9.5.10Header::get() always returns an Attribute::class instanceAttribute::class accessor methods renamed to shorten their names and improve the readabilityarray|bool will now always return a Response::class instance.ResponseException::class gets thrown if a response is empty or contains errorsMessage::fromFile())nullType casting added to several ImapProtocol return values
NONEXISTENT errors while selecting or examining a folderPaginatedCollection::paginate (thanks @rogerb87)Client::getFoldersWithStatus() recursive loading fixed (thanks @szymekjanaczek)Folder::appendMessage() (thanks @rskrzypczak)The $auto_reconnect used with Folder::indle() is deprecated and doesn't serve any purpose anymore.
DONE method refactoredHasEvent::getEvent return value set to mixed to allow multiple event typesfread (stream_context timeout issue fixed)Folder::idle() method reworked and several issues fixedHasEvent::getEvent returns a mixed result. Either an Event or a class string representing the event class.empty response instead of failed to read - connection closed?.$auto_reconnect used with Folder::indle() is deprecated and doesn't serve any purpose anymore.Handle incomplete address to string conversion
Client::getTimeout()Folder:idle() auto modeClient::getFolder() updated to circumvent special edge casesmessage_no removed from Message::class\r\n\t (thanks @Oliver-Holz)InvalidWhereQueryCriteriaExceptionstream_set_timeout() removedFolder::idle()$message->from[0])Query::chunked(). Just in case you can't fetch all messages at onceAttribute:classUID as available search criteria (thanks @szymekjanaczek)Folder::query(["FEATURE_NAME"])WhereQuery::where() accepts now a wide range of criteria / values.\Webklex\PHPIMAP\Exceptions\MessageNotFoundException::class)Message::move() and Message::copy() no longer accept folder names as folder pathMessage::class instance might no longer have a message_no attributeboolean $uid option no longer support a boolean. Use IMAP::ST_UID or IMAP::NIL instead. If you want to use an alternative to UID just use the string instead.options.sequence changed from IMAP::ST_MSGN to IMAP::ST_UID.Folder::query() no longer accepts a charset string. It has been replaced by an extension array, which provides the ability to automatically fetch additional features.Attachment::save() return error 'A facade root has not been set'
IMAP::ST_UID is setMessage::attachments() for Message::getAttachments() addedMessage::addFlag() for Message::setFlag() addedMessage::removeFlag() for Message::unsetFlag() addedMessage::flags() for Message::getFlags() addedMessageFlagException::class addedMessage::setSequenceId($id) addedÀttribute::class instance (should behave the same way as before, but might cause some problem in certain edge cases)Address::class instance (should behave the same way as before, but might cause some problem in certain edge cases)MessageFlagException::class exception can be thrown if a runtime error occursAttribute class here: www.php-imap.com/api/attributeAddress class here: www.php-imap.com/api/addressMissing env variable IMAP_AUTHENTICATION added
IMAP_AUTHENTICATION addedoptions.fetch set to IMAP::FT_PEEKMessage::getTextBody() fallback value fixedMessage::thread()Folder::overview() method added to fetch all headers of all messages in the current folderoptions.message_key option uid addedHeader::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.Prevent text bodies from being fetched as attachment
in_reply_to "unified" to be always an arrayProtocol::moveMessage() instead of Protocol::copyMessage() and Message::delete()Query::paginate() (@Max13)Message::getAttributes() hasn't returned all parametersStr::class dependency removed from Header::classAttachement::getExtension() fixedProtocol::moveMessage() method addedClient::getFolder($name, $deleimiter = null) to accept either a folder name or path (@DasTobbel)ClientManager::make() method added to support undefined accountsClient::getFolderByPath() added (@Max13)Client::getFolderByName() added (@Max13)Message::$in_reply_to type changed from mixed to arrayMissing default config parameter added #346
Redundant class ClientManager::class removed and config handling moved to depending library "webklex/php-imap" #345 #344
ClientManager::class removed and config handling moved to depending library "webklex/php-imap" #345 #344\Webklex\IMAP\ClientManager::class no longer exists. Please use the \Webklex\IMAP\Facades\Client::class facade or \Webklex\PHPIMAP\ClientManager::class instead.Missing default config parameter added
### Fixed - Wrong path to config directory
Encoding / Decoding improved and exception fallback added
webklex/php-imapIMAP to PHPIMAPException handling improved and missing child exception added
Greatly increased IDLE performance
Default fetch attributes set to null in order to use the config default value
null in order to use the config default value### Fixed - Event parameter handling fixed
### Added - IDLE like support added (#185) ### Affected Classes - Query::class
Message events added (deleted, restored, moved, new*)
Point to root namespace if handling native functions
CUSTOM Convert encoding of personal data struct #272
Date handling in Folder::appendMessage() fixed #224
.csv attachement is not processed #231
Pagination count total bug #213
Problem with Message::moveToFolder() and multiple moves #31
iconv(): error suppressor for //IGNORE added #184
Replace embedded image with URL #151
Fix sender name in non-latin emails sent from Gmail
Removed "-i" from "iso-8859-8-i" in Message::parseBody #146
Folder delimiter check added #137
Broken non-latin characters in subjects and attachments #133
Message subjects and attachment names will now be decoded with a guessed encoding #97 #107
Fixing undefined index error if associative config array isn't properly filled #131
fetch_flags default set to true on all methods
Config loading fixed and moved to a custom solution
Don't set the charset if it isn't used - prevent strange outlook mail server errors #100
WhereQuery aliases for all where methods added
Potential imap_close() error fixed #118
Nothing published for this version
Force to add a space between criteria in search query, otherwise no messages are fetched. Thanks to @cent89
Client::createFolder($name) fixed #91
Nothing published for this version
Nothing published for this version
Nothing published for this version
Handle Carbon instances in message search criteria #82
Specify provider name when publishing the config #80
Added option for optional attachment download #76
More explicit date validation statements
New validation rule for a new invalid date format added (Exception Parse Data #45)
Clear error stack before imap_close #72
### Added - FolderCollection::class added - Comments updated ### Affected Classes - Client::class - Folder::class - FolderCollection::class
Unnecessary methods declared deprecated
Message collection moved to Support
Prevent automatic body parsing (will be default within the next major version (2.x))
Support message delivery status #47
Enable support to get In-Reply-To property from Message header. #56
Set and unset flags added $oMessage->setFlag(['Seen', 'Spam']) or $oMessage->unsetFlag('Spam')
$oMessage->setFlag(['Seen', 'Spam']) or $oMessage->unsetFlag('Spam')$oMessage->getHeader()$oMessage->getHeaderInfo()Your coding agent can read these notes before it upgrades. Set up the MCP server →