473,378 Members | 1,422 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

imap_open error

I am having troubles with some imap_open()

I am using the following code:

<?php

$mbox = imap_open ("{mailserver:993/imap/ssl/no-validatecert}INBOX", "user",
"password");

echo "<p><h1>Mailboxes</h1>\n";
$folders = imap_listmailbox ($mbox,
"{mailserver:993/imap/ssl/novalidate-cert}", "*");

if ($folders == false) {
echo "Call failed<br>\n";
} else {
while (list ($key, $val) = each ($folders)) {
echo $val."<br>\n";
}
}

echo "<p><h1>Headers in INBOX</h1>\n";
$headers = imap_headers ($mbox);

if ($headers == false) {
echo "Call failed<br>\n";
} else {
while (list ($key,$val) = each ($headers)) {
echo $val."<br>\n";
}
}

imap_close($mbox);

?>

I get the following error:

Notice: (null)(): Can't open mailbox
{mailserver:993/imap/ssl/no-validatecert}INBOX: invalid remote specification
(errflg=2) in Unknown on line 0

I am using PHP 4.3.1 under Windows XP with Apache 2.0.46. I have enabled
the imap and openssl extensions in php.ini.

Anyone know what the problem is? I have done some googling and RTFM but I
can't see where I am going wrong.

Thanks in advance

James Turnbull
Jul 16 '05 #1
2 8303
Jon Kraft wrote:
"James Turnbull" <ja***@lovedthanlost.net> wrote:
I am having troubles with some imap_open()

$mbox = imap_open ("{mailserver:993/imap/ssl/no-validatecert}INBOX",

Notice: (null)(): Can't open mailbox
{mailserver:993/imap/ssl/no-validatecert}INBOX: invalid remote
specification (errflg=2) in Unknown on line 0


Hi James,

It has to be "novalidate-cert", not "no-validatecert".

JOn


Tried that. Still same error message.

Regards

James Turnbull
Jul 16 '05 #2
"James Turnbull" <ja***@lovedthanlost.net> wrote:
Jon Kraft wrote:
"James Turnbull" <ja***@lovedthanlost.net> wrote:
I am having troubles with some imap_open()

$mbox = imap_open ("{mailserver:993/imap/ssl/no-validatecert}INBOX",

Notice: (null)(): Can't open mailbox
{mailserver:993/imap/ssl/no-validatecert}INBOX: invalid remote
specification (errflg=2) in Unknown on line 0


It has to be "novalidate-cert", not "no-validatecert".


Tried that. Still same error message.


$mbox = imap_open ("{mailserver:993/imap/ssl/novalidate-cert}INBOX",
"user", "password");

You obviously replaced username and password here.
But what about mailserver? Is that a replacement for a server name or IP?
- Make sure it is correct and up and running.
- Try telnetting to it on port 993.
- Check username & password

JOn
Jul 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Rodney Pont | last post by:
I'm trying to use imap_open to get news from a server that requires a user name and password. I'm using $nntp = imap_open("{".$newsserver."/nntp:".$port."}".$newsgroup, $newsuser, $newspass,...
0
by: Dennis Biletsky | last post by:
Hi, I have a problem to connect mailbox using IMAP_OPEN. There is no problem to connect using standard port such as imap_open ("{10.0.0.0:143}INBOX", "user", "pass"), but I have a problem...
0
by: Hartt | last post by:
hi,all I have written a php scripts to test my mail server which built with Cyrus-imapd 2.2.3 OpenLDAP Postfix. <?php...
2
by: amiliv | last post by:
I'm attempting to connect to Cyrus IMAP server using imap_open() function. The connection is sucessfull, however there is a delay and warning message about "rsh failure". I added /norsh flag to...
0
by: oliversl | last post by:
Hi, I have a stock RHEL4 server and not that the imap_open() function no longer works. I have a local pop3 server running dovecot that I use to autenticate with this line: $imap_stream =...
0
by: R. Pelizzi | last post by:
hello, i'm getting a very strange behaviour with imap_open. My code does: $stream = imap_open("{{$_SESSION}:110/pop3}INBOX", $_SESSION, $_SESSION); then checks if that stream is valid... well,...
4
by: qccitchy | last post by:
G'day, I am so stuck I am pulling what's left of my hair out. Any gurus out there that can help me with this would be greatly appreciated. I am relatively new to php and am trying to connect...
1
by: Eric | last post by:
Hello, I am using imap_open ("{pop.server.com:110/pop3/ notls}INBOX","user","password") in a page that gets emails with pop3 protocol. Imap_open works perfectly on my PC + easyphp1.8, but not on...
2
by: Eric | last post by:
Hello, I use imap_open ("{pop.server.com:110/pop3/ notls}INBOX","user","password") in a function to get email from pop3 server. But, it is not working on my new serveur, and it was working on my...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.