Esempio n. 1
0
        closedir($handle);
    }
    // If we have expunge on logout ( e.g PDMF IMAP server)
    if ($pref['expunge_logout'] == '1') {
        $atmail->status = $auth->getuser($atmail->SessionID);
        $atmail->loadprefs(1);
        require_once 'GetMail.php';
        $mail = new GetMail(array('Username' => $atmail->username, 'Pop3host' => $atmail->pop3host, 'Password' => $auth->password, 'Mode' => $atmail->Mode, 'Type' => $atmail->MailType));
        if ($atmail->MailType == 'imap') {
            $mail->login();
            $folders = $mail->listfolders();
            // Create a new folder-tree element
            $mail->newfolder_tree();
            // Loop through each of the folders
            foreach ($folders as $folder) {
                $mail->expunge($folder);
            }
        }
    }
    session_destroy();
}
$var['Ajax'] = '1';
$var['error'] = $_REQUEST['error'];
$atmail->LoginType = "simple";
$atmail->Ajax = '1';
$atmail->Language = 'english';
$atmail->FontStyle = 'Verdana';
$var['atmailstyle'] = $atmail->parse("html/{$atmail->Language}/simple/atmailstyle.css");
$var['mailstyle'] = $atmail->parse("html/{$atmail->Language}/simple/atmailstyle-mail.css");
$var['func'] = 'login';
$atmail->FromField = 'me';