-
-
Notifications
You must be signed in to change notification settings - Fork 182
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
since() query returning empty response #215
Comments
same problem here as well:
if the date is in a different format, like 14 May 2019 then i'll get an error message:
|
Date format for SINCE should be DD-MMM-YYYY, IMAP protocol doesn't accept just any format. From IMAP specs:
This works for me: |
Hi @todorowww , If you take a look at https://tools.ietf.org/html/rfc2822 section "3.3. Date and Time Specification" which is referred by https://tools.ietf.org/html/rfc1064 "d M y" should be used but rfc1064 provides an example with "d-M-y". Now it seems like "d-M-Y" is valid as well. Where didi you find "d-M-Y"? :) Best regards Update: Update II: |
@todorowww solution worked for me
I've tested this by sending request on Outlook server and got the correct response Also I've added time according to rfc1064 like this $messages = $folder->query(null)->since($since->format('d-M-Y H:i:s-z'))->get(); Thanks :) |
I have this problem too; |
Hey @Webklex I've found the data in the RFC3501 - IMAP v4r1 (page 84 has the date spec) What I think is the "issue", is that SINCE uses internal date, instead of RFC2822 date in the headers. And obviously, some implementations are perhaps stricter, or looser, in upholding the standard.
|
same problem -_- |
I've added a new config parameter so everyone is free to choose what ever works best :) Please take a look at the current config/imap.php file for more information. |
Hello,
I have an issue while querying messages by date from the server, and I get an empty result when there should be new messages.
Here is the example of it:
I've tried several ways of doing this. Some of them are:
since()
method e.g.->since(Carbon::now()->subDays(2))
where()
method withSINCE
key e.g.->where(['SINCE', Carbon::parse('15.03.2018')])
but none of them work. In the above example, if I remove
since()
method everything works and I get all messages from that folder.The only way that I could do this now is to get all messages from that folder and then parse it, which takes a lot of time since there are many messages in that folder.
I'm connecting to IMAP Outlook server for this purpose.
IMAP Package version is "1.4.1".
Running PHP 7.2 on Ubuntu.
Is there another way or am I doing something wrong?
Other than that, everything works fine.
The text was updated successfully, but these errors were encountered: