method __construct documentation in bbn\Appui\Mailbox

function($cfg) { if (\is_array($cfg)) { if (!empty($cfg['type'])) { $this->type = $cfg['type']; } $this->host = $cfg['host'] ?? null; $this->login = $cfg['login']; $this->pass = $cfg['pass']; $this->folder = $cfg['dir'] ?? 'INBOX'; $this->_ping_interval = self::$_default_ping_interval; switch ($this->type){ case 'hotmail': $this->port = 993; $this->mbParam = '{imap-mail.outlook.com:' . $this->port . '/pop3/ssl}'; break; case 'gmail': $this->port = 993; $this->mbParam = '{imap.googlemail.com:' . $this->port . '/imap/ssl}'; break; /* case 'pop': $this->port = 110; $this->mbParam = '{' . $this->host . ':' . $this->port . '/pop3}'; break; */ case 'imap': if (empty($cfg['ssl'])) { $this->port = 143; $this->mbParam = '{' . $this->host . ':' . $this->port . '/imap/tls/novalidate-cert}'; } else { $this->port = 993; $this->mbParam = '{' . $this->host . ':' . $this->port . '/imap/ssl}'; } break; case 'local': $this->host = 'localhost'; $this->port = 143; //$this->mbParam = '{' . $this->host . ':' . $this->port . '/imap/tls/novalidate-cert}'; $this->mbParam = '{' . $this->host . ':' . $this->port . '/imap/notls}'; break; } if (isset($this->mbParam)) { $this->stream = imap_open($this->mbParam . $this->folder, $this->login, $this->pass); if ($this->stream) { $this->folders[$this->folder] = [ 'last_uid' => null, 'num_msg' => null, 'last_check' => null ]; $this->status = 'ok'; } else { $this->status = imap_last_error(); } } } }

BBN is a suite of PHP and JS libraries and VueJS components - all open-source! bbn.io, build applications, the quick way

This website uses cookies to ensure you get the best experience on our website.