imap_open()

Status
Not open for further replies.

marantzsquare

New Member
Messages
4
Reaction score
0
Points
0
two weeks ago everything was ok with imap_open(), I haven't change my code.. and
now it doesn't work, why?:dunno:

10X
 

zapzack

New Member
Messages
606
Reaction score
19
Points
0
Is there an error message? Anything else that would help us diagnose it? Maybe attach the code?
 

marantzsquare

New Member
Messages
4
Reaction score
0
Points
0
after i posted this, my code works just one time :nuts:
my code works perfectly on my local server, and it worked perfectly till i posted my comment..

Code:
...
...
...

$mbox = @imap_open($SERVERMAIL, $USERMAIL, $PASSMAIL)
      or die("can't connect: " . imap_last_error());

$status = imap_status($mbox, $SERVERMAIL, SA_ALL);
if ($status)
    {
      echo "Msg:   " . $status->messages    . "<br />\n";
      echo "New:   " . $status->unseen      . "<br />\n";
    }
else
    {
      echo "imap_status failed: " . imap_last_error() . "\n";
    }

...
...
...

the error was in the statement imap_open(....);
right now i'm trying to understand why.. and suddenly it come back to works :eek4:
Edit:
after i posted this, my code works just one time :nuts:
my code works perfectly on my local server, and it worked perfectly till i posted my comment..

Code:
...
...
...

$mbox = @imap_open($SERVERMAIL, $USERMAIL, $PASSMAIL)
      or die("can't connect: " . imap_last_error());

$status = imap_status($mbox, $SERVERMAIL, SA_ALL);
if ($status)
    {
      echo "Msg:   " . $status->messages    . "<br />\n";
      echo "New:   " . $status->unseen      . "<br />\n";
    }
else
    {
      echo "imap_status failed: " . imap_last_error() . "\n";
    }

...
...
...
the error was in the statement imap_open(....);
right now i'm trying to understand why.. and suddenly it come back to works :eek4:

I quote myself.. :biggrin:

right now it doesn't work any more... I think the problem does not depend on my code.. but surely from the server status.. or something related to the administration side.
 
Last edited:

leafypiggy

Manager of Pens and Office Supplies
Staff member
Messages
3,819
Reaction score
163
Points
63
It's probably just a problem with the email server. Just wait and see if it's resolved in time.

I think Corey was doing some stuff with exim.
 

zapzack

New Member
Messages
606
Reaction score
19
Points
0
Can you try this for me?

Code:
<?php
$mbox = imap_open("{localhost}", $USERMAIL, $PASSMAIL, OP_HALFOPEN)
      or die("Can't Connect: " . imap_last_error());

$status = imap_status($mbox, "{localhost}INBOX", SA_ALL);
if ($status) {
  echo "Messages:   " . $status->messages    . "<br />\n";
  echo "New Messages:     " . $status->unseen      . "<br />\n";
} else {
  echo "imap_status failed: " . imap_last_error() . "\n";
}

imap_close($mbox);
?>
 

zen-r

Active Member
Messages
1,937
Reaction score
3
Points
38
Re: very

How does this help this person. It doesn't. Stop spamming and :gtfo2:

If you want to deal with spam, the best way is to click the Report Post icon, or in cases like this, PM the poster. These sort of posts are usually the result of a noob who thinks that they have to post, rather than just log-in every 2 weeks.

Your posting here probably won't even get seen by the spammer, & just looks like spam itself (upping your post count?)

Here's the message I usually PM to noobs who do this ;

Hi.

Judging by the often pointless posts that you are regularly making in these forums, it looks like you have misunderstood the forum rules regarding keeping your x10 account active.

You only have to log in at least once in every 2 weeks.

You don't have to post anything.


Ideally, you would at least visit the News section whilst you're logged in, so you can keep up with any important service-related issues.

I hope this helps.

Cheers. :)
 

marantzsquare

New Member
Messages
4
Reaction score
0
Points
0
Can you try this for me?

Code:
<?php
$mbox = imap_open("{localhost}", $USERMAIL, $PASSMAIL, OP_HALFOPEN)
      or die("Can't Connect: " . imap_last_error());

$status = imap_status($mbox, "{localhost}INBOX", SA_ALL);
if ($status) {
  echo "Messages:   " . $status->messages    . "<br />\n";
  echo "New Messages:     " . $status->unseen      . "<br />\n";
} else {
  echo "imap_status failed: " . imap_last_error() . "\n";
}

imap_close($mbox);
?>


Yes, of course! My "..." (dot dot dot) in the code include also imap_close($mbox);

i'm testing.. i'll let you know..
 
Status
Not open for further replies.
Top