Skip to content

since() query returning empty response #215

@alen125

Description

@alen125

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:

$messages = $this->emailClient  
                 ->getFolder("Inbox")  
                 ->query()  
                 ->since('28.04.2019')  
                 ->get();  

I've tried several ways of doing this. Some of them are:

  • sending Carbon instance in since() method e.g. ->since(Carbon::now()->subDays(2))
  • building custom query using where() method with SINCE 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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions