[feat] log
This commit is contained in:
14 files changed
+305
-210
No files matched your search
@@ -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)}`);
|
||||
|
||||
Reference in new issue
Block a user