PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Authentication » Auth » Bug #4283

new option for IMAP container

Details

Request #4283new option for IMAP container
Submitted2005-05-05 11:47 UTC
Frompost at mark-wiesemann dot de
Assignedaashley
StatusWont fix
PackageAuth
PHP VersionIrrelevant
OSIrrelevant
Roadmaps(Not assigned)

Comments

[2005-05-05 11:47 UTC] post at mark-wiesemann dot de

Description:
------------
I'd like to suggest adding a new option for the IMAP container:

imap_open allows to specify some flags in the $mailbox parameter (see www.php.net/imap_open, Table 1: "Optional flags for names")

Currently $dsn is build this way:
$dsn = '{'.$this->options['host'].':'.$this->options['port'].$this->options['baseDSN'].'}';

My suggestion: Use (new) $this->options['flags'] and do it this way:

$dsn = '{'.$this->options['host'].':'.$this->options['port'].$this->options['baseDSN'];
foreach ($this->options['flags'] as $flag) {
$dsn .= '/' . $flag;
}
$dsn .= '}';

This is especially usefull on errors with SSL certificate. With my addition one can pass $options = array('novalidate-cert) and there is no trouble with the certificate anymore.

I can provide a patch for current CVS version ...

[2006-02-21 05:37 UTC] aashley at php dot net

This is what the baseDSN option is for

$params = array(
'host' => 'mail.example.com',
'port' => 143,
'baseDSN' => '/imap/ssl/novalidate-cert',
);
$myAuth = new Auth('IMAP', $params);