Reputation: 61
I have enabled pop as well as imap on my gmail account which I am using for testing to read inbox using imap and pop in php.
However, I have successfully connected with other server and read emails from those server but gmail is blocking the connection and throwing the errors as given below:
imap_open(): Couldn't open stream {imap.gmail.com:993/imap/ssl}. Can't connect to imap.gmail.com,993: Connection timed out; Can't connect to imap.gmail.com,993: No route to host; Can't connect to imap.gmail.com,993: Network is unreachable
i am using Webklex/laravel-imap package
Upvotes: 0
Views: 5202
Reputation: 2401
Webklex/laravel-imap doesn't support XOAUTH as Gmail says that you now need to interact with their implementation of the imap protocol as they note here Gmail - IMAP, POP, and SMTP
A Github issue has already been raised Webklex/laravel-imap/issues/180 which leads us back to this Stackoverflow - PHP IMAP and XOAUTH .
I would suggest that you implement a different client for working with Gmail, you can try one of these packages:
Upvotes: 0