正在显示
1 个修改的文件
包含
28 行增加
和
0 行删除
@@ -422,6 +422,34 @@ class Mail { | @@ -422,6 +422,34 @@ class Mail { | ||
422 | $data['subject'] = mb_substr($data['subject'],0,3500); | 422 | $data['subject'] = mb_substr($data['subject'],0,3500); |
423 | try { | 423 | try { |
424 | $id = $db->throw()->insert(listsSql::$table,$data); | 424 | $id = $db->throw()->insert(listsSql::$table,$data); |
425 | + if($id){ | ||
426 | + // 是否是预热邮件 aicc专用 | ||
427 | + if(!empty($header['Aicc-Hot-Mail'])){ | ||
428 | + try { | ||
429 | + $f = $db->value(folderSql::first($data['folder_id'],'folder')); | ||
430 | + $f = folderAlias($f); | ||
431 | + if($f=='收件箱'){ | ||
432 | + $f = 's'; | ||
433 | + }elseif($f=='发件箱'){ | ||
434 | + $f = 'f'; | ||
435 | + }elseif($f=='垃圾箱'){ | ||
436 | + $f = 'l'; | ||
437 | + } | ||
438 | + if(in_array($f,['s','f','l'])){ | ||
439 | + $db->throw()->insert('fob_hot_mail',[ | ||
440 | + 'lists_id' => $id, | ||
441 | + 'email_id' => $data['email_id'], | ||
442 | + 'hot_form' => $data['from'], | ||
443 | + 'folder' => $f | ||
444 | + ],false); | ||
445 | + } | ||
446 | + }catch (\Throwable $exception){ | ||
447 | + logs($exception->getMessage()); | ||
448 | + } | ||
449 | + | ||
450 | + } | ||
451 | + } | ||
452 | + | ||
425 | }catch (\Throwable $e){ | 453 | }catch (\Throwable $e){ |
426 | // 插入失败,尝试更新 | 454 | // 插入失败,尝试更新 |
427 | $db->update(listsSql::$table,$data,dbWhere([ | 455 | $db->update(listsSql::$table,$data,dbWhere([ |
-
请 注册 或 登录 后发表评论