troubleshooting Question

IMAP ERROR - Couldn't open stream

Avatar of MarthaJ Sayers
MarthaJ Sayers asked on
PHPEmail Servers
6 Comments1 Solution204 ViewsLast Modified:
Hi Folks,

    I am getting preeeetty frustrated here.  I have a php page in which I need to connect to a email account and pull all the emails. I am using localhost to create this page. (Windows 64 pro - php 5.6.25 - Apache -2.4.23 - WampServer)
The mail server is hosted at HostGator.

The error msg:

Warning: imap_open(): Couldn't open stream {}INBOX in C:\wamp\www\AcademyEmails\mytest.php on line 24


Cannot connect to Gmail:TLS/SSL failure for Invalid token, probably not an SSL server

We are - for testing - using non-ssl setting. And I know the port is correct, the username, password etc is correct.
Below is the line of coding - I starred out the actual server/user/pwd for posting.

$inbox = imap_open('{imap.***.com:143/debug/imap/ssl/novalidate-cert}INBOX','**********','********') or die('Cannot connect:' . imap_last_error());

Any help apperciated - pretty urgent for me....
thank you
MarthaJ Sayers

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 6 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 6 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros