php-imap icon indicating copy to clipboard operation
php-imap copied to clipboard

Check other mailbox

Open KodaCHC opened this issue 3 years ago • 7 comments

Hello

I want to use OAuth for Microsoft.

I have a user [email protected] which has no own mailbox. Then I have a user [email protected].

user1 has FullAccess to the mailbox user2. Now how can I access the mailbox of user2 with user1?

Other question: I get the error "connection setup failed" like here: https://github.com/Webklex/php-imap/issues/232 Have you a solution for this?

KodaCHC avatar Aug 09 '22 05:08 KodaCHC

Hi @KodaCHC , I'm not to familiar with shared outlook mailboxes. Have you checked if they are listed if you dump var_dump($client->getFolders()) ? Perhaps their name or path are a bit strange.

Best regards,

Webklex avatar Aug 09 '22 06:08 Webklex

Regarding OAuth, checkout these examples: https://www.php-imap.com/examples/oauth

If you are still experiencing problems, try to enable the debug mode inside your config file: https://github.com/Webklex/php-imap/blob/master/src/config/imap.php#L152

Webklex avatar Aug 09 '22 06:08 Webklex

Thank you for answer

I think you missed the first question?

I have used the example. I will now test debug

KodaCHC avatar Aug 09 '22 06:08 KodaCHC

That's possible, I'm not sure to which function you are referring to.

My experience with microsoft/azure/outlook isn't that great - its usually complicated, not intuitive and works different then everywhere else. They also don't care much about rfc standards :D

Best regards & happy coding,

Webklex avatar Aug 09 '22 06:08 Webklex

Thank you. For SharedMailbox: https://stackoverflow.com/questions/28481028/access-office356-shared-mailbox-with-php Have you a function for this, or what is the best soltion?

They also don't care much about rfc standards :D I know. really anoying

The debug: >> TAG1 AUTHENTICATE XOAUTH2 dXNlcj......QE= << NO AUTHENTICATE failed. >> TAG2 LOGOUT << BYE Microsoft Exchange Server IMAP4 server signing off. << OK LOGOUT completed. The same with the openssl command

I have found an info with the authorization for "https://outlook.office365.com/IMAP.AccessAsUser.All" which I will try

KodaCHC avatar Aug 09 '22 07:08 KodaCHC

Drop me a mail at [email protected], I'll forward you a conversation I had a few month back.

Webklex avatar Aug 09 '22 07:08 Webklex

Thank you. I have send you the mail

KodaCHC avatar Aug 09 '22 08:08 KodaCHC

Hi @KodaCHC , I'm closing this issue. If I'm wrong and this one is still active, please feel free to reopen it :)

Best regards,

Webklex avatar Aug 19 '22 19:08 Webklex