作者 邓超

mailbody

... ... @@ -13,7 +13,8 @@
"ext-redis": "*",
"elasticsearch/elasticsearch": "8.1.*",
"phpmailer/phpmailer": "^6.7",
"swlib/saber": "^1.0"
"swlib/saber": "^1.0",
"ext-pcntl": "*"
},
"autoload": {
"psr-4": {
... ...
... ... @@ -1100,6 +1100,31 @@ class Home extends Base {
app()->_json(MailFun::deSubscribeUrl($key));
}
/**
* 只回去body内容
* @throws \Lib\Err
* @author:dc
* @time 2025/7/17 9:50
*/
public function bodyinfo(){
$id = app()->request('list_id');
$body = getMailBody($id);
if(!$body){
$data = db()->value(listsSql::first(dbWhere(['id'=>$id]),'folder_id,email_id,uid'));
$folder = db()->value(folderSql::first(['id'=>$data['folder_id']],'origin_folder'));
try{
(new SyncMail($data['email_id']))->mail($folder,[$data['uid']],true);
}catch (\Throwable $e){}
}
$body = getMailBody($id);
app()->_json($body);
}
}
... ...
... ... @@ -37,6 +37,7 @@ return [
// 邮件详情
'info' => [\Controller\Home::class, 'info'],
'mailbody' => [\Controller\Home::class, 'bodyinfo'],
// 邮件文件夹
'folder' => [\Controller\Folder::class, 'lists'],
// 创建文件夹
... ...