...
|
...
|
@@ -39,6 +39,39 @@ class AutoMail { |
|
|
$this->fids = $this->db->all("select `id` from `folders` where `folder` = '收件箱'");
|
|
|
$this->fids = array_column($this->fids,'id');
|
|
|
|
|
|
$filter = '2 Automatic reply
|
|
|
2 Delivery
|
|
|
2 Automatische Antwort
|
|
|
2 Undeliverable
|
|
|
2 Failure
|
|
|
2 Undelivered
|
|
|
1 noreply
|
|
|
1 postmaster
|
|
|
1 email-notifications
|
|
|
1 mailer-daemon
|
|
|
1 no-reply
|
|
|
2 自动回复
|
|
|
2 Returned mail
|
|
|
2 Autosvar
|
|
|
2 Out Of Office Re
|
|
|
2 Change_of_email_address
|
|
|
2 delivered
|
|
|
2 automatique
|
|
|
2 Reply auto
|
|
|
2 automatic
|
|
|
2 Request received
|
|
|
2 Automatisch
|
|
|
2 Unzustellbar
|
|
|
2 Notification
|
|
|
2 expired';
|
|
|
$filter = explode("\r\n",$filter);
|
|
|
foreach ($filter as $f) {
|
|
|
if (!$f) continue;
|
|
|
$this->filter[] = [
|
|
|
intval(mb_substr($f, 0, 1)),
|
|
|
trim(mb_substr($f, 1, 99)),
|
|
|
];
|
|
|
}
|
|
|
|
|
|
if(redis()->add('auto_mail_sync2',1,60)){
|
|
|
echo '正在计算数据';
|
...
|
...
|
@@ -74,26 +107,7 @@ class AutoMail { |
|
|
|
|
|
}
|
|
|
|
|
|
private $filter = [
|
|
|
['2','Automatic reply'],
|
|
|
['2','Delivery'],
|
|
|
['2','Automatische Antwort:'],
|
|
|
['2','Automatic_reply'],
|
|
|
['2','Undeliverable'],
|
|
|
['2','Failure'],
|
|
|
['2','Undelivered'],
|
|
|
['1','noreply'],
|
|
|
['1','postmaster'],
|
|
|
['1','email-notifications'],
|
|
|
['1','mailer-daemon'],
|
|
|
['1','no-reply'],
|
|
|
['2','自动回复'],
|
|
|
['2','Returned mail'],
|
|
|
['2','Autosvar'],
|
|
|
['2','Out Of Office Re'],
|
|
|
['2','Change_of_email_address'],
|
|
|
['2','delivered']
|
|
|
];
|
|
|
private $filter = [];
|
|
|
|
|
|
private function run($id){
|
|
|
$list = $this->db->all(\Model\listsSql::all(dbWhere(['id'=>$id]),'`id`,`from`,`subject`,`folder_id`'));
|
...
|
...
|
@@ -129,7 +143,7 @@ swoole_set_process_name('auto-reply-run-man'); |
|
|
|
|
|
$pm = new Swoole\Process\Manager();
|
|
|
|
|
|
$pm->addBatch(2,function (){
|
|
|
$pm->addBatch(10,function (){
|
|
|
|
|
|
swoole_set_process_name('auto-reply-email-run');
|
|
|
|
...
|
...
|
|