Skip to content
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

Return Empty data[] #130

Closed
ghost opened this issue Jul 25, 2018 · 2 comments
Closed

Return Empty data[] #130

ghost opened this issue Jul 25, 2018 · 2 comments

Comments

@ghost
Copy link

ghost commented Jul 25, 2018

Hi, @Webklex
Thanks for your great work

I am just trying to use this project on my web application
When I try to get the messages in the 'Inbox' folder, it returns empty data[] btw.
Could you explain me what I was wrong?

Here is a code snippet I tried.

$oClient = new Client([
    'host'          => 'imap-mail.outlook.com',
    'port'          => 993,
    'encryption'    => 'ssl',
    'validate_cert' => true,
    'username'      => '[email protected]',
    'password'      => 'secret',
]);
$oClient->connect();
$oFolder = $oClient->getFolder('Inbox');
$aMessage = $oFolder->query()->since('15.03.2018')->get();
var_dump($aMessage);

For now, $aMessage returns empty value: data[]

Thanks in advance for your help.

@Webklex
Copy link
Owner

Webklex commented Jul 25, 2018

Hi @Flow999Cloud ,
please take a look at #100 and perhaps the other Outlook related issues.
Outlook seems to be "special" sometimes...

Best regards

[Update] please try "INBOX" instead of "Inbox" and just to make sure, is there actually a mail in your mailbox which matches your crieria? ;)

[Update 2] you can find all folder names if you do the following:

//Get all Mailboxes
/** @var \Webklex\IMAP\Support\FolderCollection $aFolder */
$aFolder = $oClient->getFolders();
dd($aFolder->all());

@ghost
Copy link
Author

ghost commented Jul 26, 2018

Hi, @Webklex

For update, I tried to use "Inbox" instead of "INBOX", but it doesn't work. Actually I have 335 emails in my email account. :)
For update2, I found all folder names using the above code snippet. I can see those are including Inbox, Archive, Trash etc. But when I try to use one of them, those are not working. :(

I'd like to try to use another php imap libraries for time being of the project.
I really appreciate for your help though.

Thanks.

@ghost ghost closed this as completed Jul 26, 2018
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant