method setImap documentation in bbn\Mail
Sets the IMAP configuration.
function(array $cfg)
{
if (!isset($cfg['imap_user'], $cfg['imap_pass']) && !isset($cfg['user'], $cfg['pass'])) {
die("You need to provide user and password for IMAP connection");
}
$imap_host = isset($cfg['imap_host']) ? $cfg['imap_host'] : $cfg['host'];
$this->imap_user = isset($cfg['imap_user']) ? $cfg['imap_user'] : $cfg['user'];
$this->imap_pass = isset($cfg['imap_pass']) ? $cfg['imap_pass'] : $cfg['pass'];
$this->imap_sent = isset($cfg['imap_sent']) ? $cfg['imap_sent'] : 'Sent';
if (isset($cfg['imap_port'])) {
$imap_port = $cfg['imap_port'];
}
if (!empty($cfg['imap_ssl'])) {
if (!isset($cfg['imap_port'])) {
$imap_port = 993;
}
$this->imap_string = "{".$imap_host.":".$imap_port."/ssl";
}
else {
if (!isset($cfg['imap_port'])) {
$imap_port = 143;
}
$this->imap_string = "{".$imap_host.":".$imap_port."/tls";
}
if (empty($cfg['valid'])) {
$this->imap_string .= "/novalidate-cert";
}
$this->imap_string .= "}";
return $this;
}
Sets the IMAP configuration. 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.
© 2011-2025
BBN Solutions