Comments (3)
There isn't currently, but if you find a way to do it I'd be happy to include it.
from fetch.
Looking at the PHP IMAP docs, you can call imap_getmailboxes() which will return detailed info about the mailboxes, including the IMAP separator. http://php.net/manual/en/function.imap-getmailboxes.php
So you could easily expose this via a new public method alongside the existing public method listMailboxes(). Perhaps listMailboxDetails() or something.
If you directly return the return value from imap_getmailboxes() then the user can decide how to deal with the information provided as there is other useful stuff aside from the delimiter.
In the meantime, I have also implemented a quick and dirty solution using the existing listMailBox() method, which greps the value out of the list of returned mailboxes and child mailboxes - this is assuming that some child mailboxes exist, but normally a mailbox will have at least Trash, Sent etc
foreach ($imap->listMailBox() as $mailBox)
{
$imapSeparator = preg_replace("#.*}\w+([/.]{1}).*#", "$1", $mailBox);
if (strlen($imapSeparator) == 1) break;
}
from fetch.
Closing this out as I've merged the pull request.
from fetch.
Related Issues (20)
- Allow get raw unparsed message (with all headers and body) HOT 1
- getMessages() should allow pagination, not only limit
- I'm having problems with koi8-r encoded messages HOT 3
- two issues found and corrected HOT 1
- Fetching More than 100 Email, Response is very slow.
- An empty file in the attachment generates false instead of the whole Message
- Call to undefined function Fetch\imap_num_msg() HOT 1
- Invalid cert on site HOT 2
- What happened to the channel?
- Insecure default connection flags
- Change setFileName() method from protected to public
- oAuth authentication HOT 4
- Open Shared Inbox HOT 2
- Unable to add multiple flags HOT 1
- Moving message between 2 IMAP accounts HOT 1
- IMAP TLS on 143 with Plain Auth
- ErrorException: imap_savebody(): stream filter (convert.base64-decode): invalid byte sequence HOT 1
- Question about versioning on the Packagist. HOT 2
- attachment - only from the email body HOT 1
- Compatibility issue with PHP 8.3 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fetch.