note 31586 added to function.imap-check
| From: | Jason at rack1 dot php dot net | Date: | Sun, 27 Apr 2003 02:01:01 +0000 |
| Subject: | note 31586 added to function.imap-check | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-47159@lists.php.net to get a copy of this message | ||
FYI, the code in the previous example by:
albertof at deltasoft dot com dot ar
26-Mar-2002 12:49
... produced a $mbox variable that was NOT a resource and hence the remaining code generated errors.
One solution is to not use the '|| die()' syntax and instead to do something like:
$mbox = imap_open("{...}INBOX", "...user...", "...pass...");
if ( $mbox === false ) {
die ("Can't connect: " . imap_last_error() ."\n");
}
Hope this helps!
Jason.
--
http://www.php.net/manual/en/function.imap-check.php
http://master.php.net/manage/user-notes.php?action=edit+31586
http://master.php.net/manage/user-notes.php?action=delete+31586
http://master.php.net/manage/user-notes.php?action=reject+31586