By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
426,034 Members | 1,777 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 426,034 IT Pros & Developers. It's quick & easy.

imap_open error

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
"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 discussion thread is closed

Replies have been disabled for this discussion.