-
-
Notifications
You must be signed in to change notification settings - Fork 181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How can I specify a single folder? #48
Comments
Hello, I did it that way, maybe it would help you.
|
Hi @Amos1st , Inspired by @GuiAndra it might look like something similar to this:
Best regards |
Hi @Amos1st , Short description: use Webklex\IMAP\Facades\Client;
/** @var \Webklex\IMAP\Client $oClient */
$oClient = Client::account('default');
$oClient->connect();
/** @var \Webklex\IMAP\Folder $oFolder */
$oFolder = $oClient->getFolder('INBOX.name');
/** @var \Webklex\IMAP\Message $oMessage */
foreach($oFolder->getMessages() as $oMessage){
echo $oMessage->subject.'<br />';
} Best regards |
Hello,
I can get all folders through
$client->getFolders()
, but if I would like to specify a single one, exampleINBOX
, how can I do for it? like this: foreach the mailboxes and then judge the conditionif ($mailbox->name === 'INBOX')
? pls give me some advise!look forward your reply, thanks in advance
The text was updated successfully, but these errors were encountered: