diff options
author | Markus Warg <mw@it-sls.de> | 2010-04-14 16:29:09 +0200 |
---|---|---|
committer | Markus Warg <mw@it-sls.de> | 2010-04-14 16:29:09 +0200 |
commit | 2597013887cfb5b2a9c7b0210b4deb0a0276e595 (patch) | |
tree | 53fb36b4d7d7900063a6e62c9ab160a5808d5185 /manager/library | |
parent | ae053ad0371d46f529a26c2a18953189620b88e4 (diff) | |
download | cacert-mgr-2597013887cfb5b2a9c7b0210b4deb0a0276e595.tar.gz cacert-mgr-2597013887cfb5b2a9c7b0210b4deb0a0276e595.tar.xz cacert-mgr-2597013887cfb5b2a9c7b0210b4deb0a0276e595.zip |
list mails, read mails
fix smaller issues in imap class
mail controller
list contents of mailbox
read mails
Diffstat (limited to 'manager/library')
-rw-r--r-- | manager/library/imap/imapConnection.php | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/manager/library/imap/imapConnection.php b/manager/library/imap/imapConnection.php index f78dc3d..1528a76 100644 --- a/manager/library/imap/imapConnection.php +++ b/manager/library/imap/imapConnection.php @@ -407,8 +407,8 @@ class imapConnection { if ($ret === false) { if ($reconnect === true) { $this->imap = $this->imapOpen($this->server.$this->mbox, - $this->config->getValue('username'), - $this->config->getValue('password'), + $this->config->username, + $this->config->password, OP_HALFOPEN); $ret = imap_ping($this->imap); @@ -471,26 +471,26 @@ class imapConnection { * @param $instanceName * @param $config */ - protected function __construct($instanceName,$config) { + protected function __construct($instanceName, $config) { $this->instanceName = $instanceName; $this->config = $config; - if (!$this->config->hasValue('mailhost')) { + if (!isset($this->config->mailhost)) { throw new IMAPException(__METHOD__ . ' config attribute missing: "mailhost"'); } - if (!$this->config->hasValue('username')) { + if (!isset($this->config->username)) { throw new IMAPException(__METHOD__ . ' config attribute missing: "username"'); } - if (!$this->config->hasValue('password')) { + if (!isset($this->config->password)) { throw new IMAPException(__METHOD__ . ' config attribute missing: "password"'); } - if (!$this->config->hasValue('port')) { + if (!isset($this->config->port)) { throw new IMAPException(__METHOD__ . ' config attribute missing: "port"'); } - $this->server = '{'.$this->config->getValue('mailhost').':'.$this->config->getValue('port').'/imap'; - if( $this->config->hasValue('use_tls') && - $this->config->getValue('use_tls') == true ) { + $this->server = '{'.$this->config->mailhost.':'.$this->config->port.'/imap'; + if( isset($this->config->use_tls) && + $this->config->use_tls != 0 ) { $this->server .= '/tls'; } $this->server .= '/novalidate-cert}'; @@ -502,8 +502,8 @@ class imapConnection { $this->imap = null; $this->imap = $this->imapOpen($this->server.$mbox, - $this->config->getValue('username'), - $this->config->getValue('password'), + $this->config->username, + $this->config->password, OP_HALFOPEN); if ($this->imap === false) { @@ -535,9 +535,11 @@ class imapConnection { return $instance; } + /* if (!$config instanceof Config) { throw new IMAPException(__METHOD__ . ' no config'); } + */ $object = new imapConnection($instanceName, $config); |