added imap restore to inbox feature

This commit is contained in:
SJ
2013-04-02 22:22:30 +02:00
parent 37e921898f
commit c21c27a6dd
4 changed files with 63 additions and 3 deletions

View File

@ -50,6 +50,23 @@ class ModelMailMail extends Model {
return $ok;
}
public function connect_imap() {
$this->imap = new Zend_Mail_Protocol_Imap(IMAP_HOST, IMAP_PORT, IMAP_SSL);
if($this->imap) {
if($this->imap->login($_SESSION['username'], $_SESSION['password'])) { return 1; }
}
return 0;
}
public function disconnect_imap() {
$this->imap->logout;
}
}
?>