note 36555 added to function.imap-open

From: Date: Tue, 14 Oct 2003 21:07:47 +0000
Subject: note 36555 added to function.imap-open
Groups: php.notes 
Request: Send a blank email to php-notes+get-58589@lists.php.net to get a copy of this message
It's nice to trap an error with an OR after calling an imap_open() LIKE: $mbox = imap_open ("{localhost:143/imap/notls}INBOX", "mailuser", "somepassword") || die("connection failed: ".imap_last_error()); BUT! Beware, using the || operator puts Boolean in your connection string, so change that || to OR. Or else you're going to get a "not a valid imap resource" warning later in the script. (tip from rasmus on a php mailing archieve) ---- Manual Page -- http://www.php.net/manual/en/function.imap-open.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+36555 Delete -- http://master.php.net/manage/user-notes.php?action=delete+36555&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+36555&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#58589) next »