[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

php imap to remote server

Posted on 2012-08-26
8
Medium Priority
?
822 Views
Last Modified: 2013-09-10
PHP,
I have some code I use with 'localhost' and it works without issue.
If I use 'localhost' to the server name.
This Works
$mbox = imap_open("{localhost:143/imap/novalidate-cert}INBOX", $user, $pass);

This gives an error I want to check Imap from another server
The servers are configured exactly the same.
$mbox = imap_open("{domain.com:143/imap/novalidate-cert}INBOX", $user, $pass);

Warning: imap_open() [function.imap-open]: Couldn't open stream {domain.com:143/imap/novalidate-cert}INBOX in /home/abccom/public_html/paraapi.php on line 39
Array ( [0] => Retrying PLAIN authentication after [AUTHENTICATIONFAILED] Authentication failed. [1] => Retrying PLAIN authentication after [AUTHENTICATIONFAILED] Authentication failed. [2] => Can not authenticate to IMAP server: [AUTHENTICATIONFAILED] Authentication failed. )
0
Comment
Question by:yahoolane
  • 4
  • 4
8 Comments
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 38334910
Can you connect to it with a standard email client using the same user and password?  In other words, do you know that it's working?
0
 
LVL 1

Author Comment

by:yahoolane
ID: 38335088
yes I can go to webmail and it works.
it also works as localhost on the on both servers.

.username and passwords ok.
0
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 38335098
Webmail probably works thru localhost also but that's a good check.  You would have to use something like Outlook Express or Thunderbird to see if it works remotely which is what you are trying to do with PHP.
0
Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 38335117
For what it's worth, I can't get it to work with my web host at all.
0
 
LVL 1

Author Comment

by:yahoolane
ID: 38336367
FYI
it works with outside, pc based email clinets.
it also works with outside web based email clients.
0
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 38337344
Ok, you'll have to click on "Request Attention".  I am unable to test it to see what is going on.
0
 
LVL 1

Accepted Solution

by:
yahoolane earned 0 total points
ID: 38565592
The Solution was that security setting in php keeps imap_open() from working
on some servers.
0
 
LVL 1

Author Closing Comment

by:yahoolane
ID: 39479114
Just Solution
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses how to implement server side field validation and display customized error messages to the client.
It’s a season to be thankful, and we’re thankful for users like you who engage on site, solve technology problems, and network with others in the industry. What tech are we most thankful for? Keep reading.
The basic steps you have just learned will be implemented in this video. The basic steps are shown to configure an Exchange DAG in a live working Exchange Server Environment and manage the same (Exchange Server 2010 Software is used in a Windows Ser…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
Suggested Courses
Course of the Month20 days, 2 hours left to enroll

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question