php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #6250 imap_open can't open any other mailfolder than "INBOX"
Submitted: 2000-08-18 19:27 UTC Modified: 2000-08-19 11:52 UTC
From: eric at otherways dot com Assigned:
Status: Closed Package: IMAP related
PHP Version: 4.0.1pl2 OS: Solaris 7 Sparc
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: eric at otherways dot com
New email:
PHP Version: OS:

 

 [2000-08-18 19:27 UTC] eric at otherways dot com
hi, guys
I found a weird problem, I suspect it is a version bug.


$mbox = imap_open("{".$server.":143}".$folder,$name,$passwd);

actually only can open my imap server INBOX folder,
whatever the value of $folder is.
It affects all other functions which only specific the stream name.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-08-18 19:41 UTC] hholzgra@php.net
mind to tell us which imap server you are using?
 [2000-08-18 21:39 UTC] eric at otherways dot com
yeah, It was my mistake, could you please colse this bug ticket. sorry for that.
anyway, I do have a problem about the  imap_mailboxmsginfo, I know probably this is not place to ask this question, but I am anxious to get answer, if you think it is not proper, just delete my new comment.

 I tried to display all mailboxes information in on e page, but the following scripts doesn't work.
does one page only can open one stream?


<?
$server="server";
$name="name";
$passwd="password";

$mbox = imap_open("{".$server."}","$name","$passwd") || die("can't connect: ".imap_last_error());
$list = imap_getmailboxes($mbox,"{".$server."}","%");
if(is_array($list)) {
  reset($list);
  while (list($key, $val) = each($list))
  	{
  	$folder=$val->name;
  	$mbox1 = imap_open("{".$server."}".$folder,"$name","$passwd",OP_HALFOPEN) ||    die("can't connect: ".imap_last_error());
  	$check = imap_mailboxmsginfo($mbox1);
	if($check) {
	 	$messages= $check->Nmsgs;
    		$recent = $check->Recent;
    		$unread = $check->Unread;
    		$size = $check->Size;
		echo "(".$key.")".$folder."|".$messages."|".$recent."|".$unread."|".$size."<br>";
	      }
	 else {
		print "imap_check() failed: ".imap_lasterror(). "<br>\n";
		}
	 imap_close($mbox1);
   	}
   }
else
   {
   print "imap_getmailboxes failed: ".imap_last_error()."\n";
   }
imap_close($mbox);
?>
 [2000-08-19 11:52 UTC] sniper@php.net
Closed per user request.

--Jani

(And one bug per report, please.)

 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Fri Jul 04 11:01:37 2025 UTC