imap_open error

This is a discussion on imap_open error within the PHP Language forums, part of the PHP Programming Forums category; I am having troubles with some imap_open() I am using the following code: <?php $mbox = imap_open ("{mailserver:993/...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 07-25-2003
James Turnbull
 
Posts: n/a
Default 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


Reply With Quote
  #2 (permalink)  
Old 07-25-2003
James Turnbull
 
Posts: n/a
Default Re: imap_open error

Jon Kraft wrote:
> "James Turnbull" <james@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


Reply With Quote
  #3 (permalink)  
Old 07-25-2003
Jon Kraft
 
Posts: n/a
Default Re: imap_open error

"James Turnbull" <james@lovedthanlost.net> wrote:

> Jon Kraft wrote:
>> "James Turnbull" <james@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
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 12:34 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0