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?
Hello,
Hope you are doing well!
I am trying to access my outlook.com/hotmail.com account via IMAP using the following PHP code:
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.