Author Topic: Which condition will this happen?  (Read 2463 times)

Offline yk5515

  • Jr. Member
  • **
  • Posts: 12
Which condition will this happen?
« on: June 05, 2010, 03:09:16 AM »
I wrote log in function iil_ParseResult() as following:

         if (count($a) >= 2) {
      $res = strtoupper($a[1]);
      if ($res == 'OK') {
         return 0;
      } else if ($res == 'NO') {
         write_log('errors', 'imap said No!');
         return -1;
      } else if ($res == 'BAD') {
         write_log('errors', 'imap said BAD!');
         return -2;
      } else if ($res == 'BYE') {
         write_log('errors', 'imap said BYE!');
         return -3;
      }
   }
   write_log('errors', 'unknow imap connect info!);
   write_log('errors', $a);
   return -4;

After this, i got these errors:

[04-Jun-2010 01:10:07 -0700]: NULL
[04-Jun-2010 01:10:07 -0700]: Authentication for xxxx@xxx.com response code is -4 failed (LOGIN): ""
[04-Jun-2010 01:10:07 -0700]: IMAP Error: Authentication for xxx@xxx.com response code is -4 failed (LOGIN): "" (GET /?_task=mail&_action=check-recent&_t=1275639301712&_list=1&_fromaction=list&_remote=1&_=1275639301716&_unlock=1)
[04-Jun-2010 01:10:07 -0700]: IMAP Error: imaperror -4 in /usr/local/xx/program/include/rcmail.php on line 431 (GET /?_task=mail&_action=check-recent&_t=1275639301712&_list=1&_fromaction=list&_remote=1&_=1275639301716&_unlock=1)
[04-Jun-2010 01:10:07 -0700]: unknow imap connect info!
[04-Jun-2010 01:10:07 -0700]: array (
0 => '',
)

I'am using devecot IMAP, this happened in the short time.

Any suggestion will be appreciative.