Skip to content

listMessages() returned empty array due to trailing whitespace in IMAP response #225

@achtnullacht

Description

@achtnullacht

Connecting to an Exchange 2007 server via imap, listMessages() returned an empty array. Reason: the IMAP response line that is being matched in line 1217 had an extra trailing whitespace.

Changing the regex in line 1217 to match the possible trailing whitespace worked for me:
if (preg_match('#^\s*\*\s+STATUS\s+"?INBOX"?\s+\((.*)\)\s+$#', $line, $match)) {

Any idea if the trailing whitespace is an issue of the Exchange servers config?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions