Home » Authentication » Auth » Bug #4283
new option for IMAP container
Details
| Request #4283 | new option for IMAP container |
|---|---|
| Submitted | 2005-05-05 11:47 UTC |
| From | post at mark-wiesemann dot de |
| Assigned | aashley |
| Status | Wont fix |
| Package | Auth |
| PHP Version | Irrelevant |
| OS | Irrelevant |
| 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);