[feat] log

This commit is contained in:
zhhe committed 2026-11-17 07:58:03 +08:00
1 parent 1fcf56e3dd
commit 44e203d868
14 files changed
+305 -210

No files matched your search

+4
View File
@@ -183,6 +183,10 @@ export class ImapReceiver {
this.hooks.onLog?.(`[mail] 收到 ${job.from} 的邮件,投递到 ${job.sessionId}`);
this.hooks.onJob(job);
}
else {
const sender = parsed.from?.value?.[0]?.address ?? '未知发件人';
this.hooks.onLog?.(`[mail] 忽略 ${sender} 的邮件:不在白名单或缺少发件地址`);
}
}
catch (error) {
this.hooks.onLog?.(`[mail] 解析 UID ${uid} 失败: ${errorMessage(error)}`);