note 13648 added to function.imap-open.php

From: Date: Tue, 26 Jun 2001 20:16:53 +0000
Subject: note 13648 added to function.imap-open.php
Groups: php.notes 
Request: Send a blank email to php-notes+get-14672@lists.php.net to get a copy of this message
I have found that the syntax for the imap_open command in PHP 4 differs whether you're passing a variable to the imap_open function or declaring the host directly within the function. If you are passing variables to the imap_open function, the syntax should look like: $username = "user"; $password = "password"; $mailserver = "mail.somedomina.com:110/imap"; $link = imap_open("\{$mailserver}INBOX",$username,$password); If you don't include the leading backslash (\) you will not open the stream. Likewise you cannot pass the curly braces to the function. If you define the server directly, omit the leading backslash. $username = "user"; $password = "password"; $link = imap_open("{mail.somedomain.com:110/pop3}",$username,$password)" I discovered all of this after 3 days of trying to get all of this work on redhat 7.1. http://www.php.net/manual/en/function.imap-open.php

« previous php.notes (#14672) next »