作者 邓超

x

... ... @@ -86,7 +86,7 @@ class AutoMail {
$ids[] = $i+$id;
}
$id = end($ids);
if($id<30000000){
if($id<($maxId-1000000)){
continue;
}
redis()->rPush('auto_check_ids',implode(',',$ids));
... ...
... ... @@ -46,7 +46,7 @@ class HotMail {
}
$id = end($ids);
if($id<25900000){
if($id<($maxId-1000000)){
continue;
}
... ...
... ... @@ -4,6 +4,8 @@ namespace Controller;
use Lib\Err;
use Lib\Imap\ImapConfig;
use Lib\Imap\ImapPool;
use Lib\Mail\Mail;
use Lib\Mail\MailFun;
use Model\folderSql;
... ... @@ -157,27 +159,24 @@ class Folder extends Base {
app()->e('folder_is_exist');
}
// 远程创建
$mail = new Mail(
$email['email'],
base64_decode($email['password']),
$email['imap']
);
$email['password'] = base64_decode($email['password']);
$email['host'] = $email['imap'];
$imap = ImapPool::get(new ImapConfig($email));
if($mail->login()!=1){
if($imap->login()->isOk()){
app()->e('login_error_imap');
}
if($id){
// 远程创建
$ret = $mail->client->folderRename($folder['origin_folder'],$origin_folder);
$ret = $imap->folder($folder['origin_folder'])->rename($origin_folder);
}else{
// 远程创建
$ret = $mail->client->folderCreate($origin_folder);
$ret = $imap->folder($origin_folder)->create();
}
if($ret[0] === false){
if(!$ret){
app()->e($ret[1]);
}
... ... @@ -256,19 +255,18 @@ class Folder extends Base {
app()->e('folder_delete_exist_mail');
}
// 远程创建
$mail = new Mail(
$email['email'],
base64_decode($email['password']),
$email['imap']
);
$email['password'] = base64_decode($email['password']);
$email['host'] = $email['imap'];
$imap = ImapPool::get(new ImapConfig($email));
if($mail->login()!=1){
if($imap->login()->isOk()){
app()->e('login_error_imap');
}
// 远程创建
$ret = $mail->client->folderDelete($folder['origin_folder']);
$f = $imap->folder($folder['origin_folder']);
if(!$f->delete()){
app()->e($f->getMessage());
}
$row = db()->delete(folderSql::$table,[
'id' => $folder['id']
... ...
... ... @@ -2,8 +2,7 @@
namespace Controller;
use Lib\Mail\Mail;
use Model\emailSql;
use Model\sendJobsSql;
use Model\sendJobStatusSql;
... ...