#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Location
    Chicago, IL USA
    Posts
    48
    Rep Power
    18
    I have php4 compiled with imap support (and yes I used the c-client libs). Whenever I issue a commands like these...

    $MyServer = "localhost/pop3:110";
    $PBOX = "INBOX";
    $username = "brendon";
    $passwd = "password";

    $mbox = imap_open("{$MyServer}$PBOX", $username, $passwd);
    echo "<p><h1>Mailboxes</h1>n";
    $folders = imap_listmailbox ($mbox, "{$MyServer}", "*");

    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 this error ...

    Warning: Couldn't open stream localhost/pop3:110INBOX in /home/customers/commaflex/mail/index.php on line 28


    <b>Mailboxes</b>

    Warning: Unable to find stream pointer in /home/customers/commaflex/mail/index.php on line 30
    Call failed


    <b>Headers in INBOX</b>

    Warning: Unable to find stream pointer in /home/customers/commaflex/mail/index.php on line 41
    Call failed

    Warning: Unable to find stream pointer in /home/customers/commaflex/mail/index.php on line 51...

    Anybody know why?

  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Location
    Chicago, IL USA
    Posts
    48
    Rep Power
    18
    ok i fixed it now apparently I didn't have localhost aliased in my /etc/hosts file hehee oops. anyways my next big question is how do you send mail with php4? in the manual it says imap_mail() only works in php3

Similar Threads

  1. Replies: 0
    Last Post: November 28th, 2003, 08:16 AM
  2. Replies: 0
    Last Post: November 9th, 2003, 03:35 PM
  3. PHP POP3 Auto E-mail Check / Forward
    By dave981 in forum PHP Development
    Replies: 17
    Last Post: July 15th, 2003, 07:40 PM
  4. Replies: 0
    Last Post: August 25th, 2002, 04:24 AM
  5. Replies: 0
    Last Post: August 7th, 2002, 06:39 PM

IMN logo majestic logo threadwatch logo seochat tools logo