Skip to content

Retrying PLAIN authentication after AUTHENTICATE failed for outlook.com and hotmail.com accounts #726

Open
@adrianbecker013

Description

@adrianbecker013

Hello,

Hope you are doing well!

I am trying to access my outlook.com/hotmail.com account via IMAP using the following PHP code:

$mailbox = new PhpImap\Mailbox(  
    '{outlook.office365.com:993/imap/ssl}', 
    xxx Email address is removed for privacy xxx',
    'xxxxxxx', 
    __DIR__, 
    'US-ASCII'
);

$folder = $mailbox->getMailboxes('*');
print_r($folder);exit;

However, I am encountering the following error:
IMAP connection error: ["Retrying PLAIN authentication after AUTHENTICATE failed.","Retrying PLAIN authentication after AUTHENTICATE failed.","Can not authenticate to IMAP server: AUTHENTICATE failed."]

I have already enabled IMAP and generated an app-specific password, which I am using in this code. Could you please let me know if I’m missing something or if there's anything else I should check?

Thanks in advance for your help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions