note 64245 deleted from function.imap-open by bjori
| From: | bjori@php.net | Date: | Tue, 11 Apr 2006 11:45:17 +0000 |
| Subject: | note 64245 deleted from function.imap-open by bjori | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-107768@lists.php.net to get a copy of this message | ||
Note Submitter: work ..at.. jaromedia ..dot.. de
Reason: in docs
----
I could successfully connect to the IMAP server using imap_open() but then had problems using
functions like imap_check.
The problem was the die command used in the imap_check example:
<?php
$mbox = imap_open ("{your.imap.host:143}INBOX", "username",
"password")
|| die ("can't connect: " . imap_last_error());
?>
When doing it this way it worked perfectly:
<?php
$mbox = imap_open ("{your.imap.host:143}INBOX", "username",
"password");
if(!$mbox){
echo "can't connect: " . imap_last_error();
exit();
}
?>