note 13648 deleted from function.imap-open by cmb

From: Date: Sun, 18 Aug 2019 08:42:26 +0000
Subject: note 13648 deleted from function.imap-open by cmb
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-211940@lists.php.net to get a copy of this message
Note Submitter: curtis at lamere dot net ---- 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.

« previous php.notes (#211940) next »