|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #64039 suppport XOAUTH2 in imap_open
Submitted: 2013-01-21 18:15 UTC Modified: 2020-01-08 05:25 UTC
Avg. Score:4.9 ± 0.4
Reproduced:92 of 92 (100.0%)
Same Version:22 (23.9%)
Same OS:61 (66.3%)
From: k dot andris at gmail dot com Assigned:
Status: Open Package: IMAP related
PHP Version: 5.3.21 OS: linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
Solve the problem:
31 - 8 = ?
Subscribe to this entry?

 [2013-01-21 18:15 UTC] k dot andris at gmail dot com
Adding XOAUTH2 support to imap_open would be very welcome. It's needed for Oauth2 
based access to Gmail. It's quite easy to add.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2020-01-08 05:25 UTC]
-Status: Open +Status: Assigned
 [2020-01-08 05:29 UTC]
Thanks for the request. It should be easy to add the XOAUTH2 mechanism to the AUTHENTICATE step of imap_open, but consumers will need to add OAuth flows to their application; that's the hard part.

Because Google and Microsoft are switching to OAuth soon, and since there may be some developers who have questions on how to put it all together, we've assembled a single resource (info, plan, status, etc) for consumers:

It's a work in progress.
 [2022-04-19 07:33 UTC] deblindan at gmail dot com
Hello, is there any news on this feature? On May 30th 2022, Google will shut down the possibility to use password authentication, with only a few exceptions, which may cover some use cases, but not all. Having imap_open support XOAUTH2 would be a big help for existing applications using imap_* functions.
 [2023-07-19 09:36 UTC] slu at baebeca dot de
Hello, is there any news about this feature? 
In the meantime, Microsoft has also completely discontinued the operation for standard IMAP for their entire Exchange-Online and Office365 structure.
This means that the PHP-IMAP implementation can unfortunately no longer be used for the major providers :(

As far as I understand it correctly, only a different base64 / AUTH mechanism would have to be implemented. So that you provide a token instead the user password.

See Microsoft documentation:
For me, it would also be a great help for existing applications to be able to use the native imap_* functions.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Sat Dec 02 16:01:27 2023 UTC