修复邮件接收异常

This commit is contained in:
eoao
2026-01-01 18:45:15 +08:00
parent 88a4b9dff5
commit e723af4229
3 changed files with 8 additions and 11 deletions

View File

@@ -152,7 +152,13 @@ export async function email(message, env, ctx) {
attachment.accountId = emailRow.accountId;
});
await attService.addAtt({ env }, attachments);
try {
if (attachments.length > 0) {
await attService.addAtt({ env }, attachments);
}
} catch (e) {
console.error(e);
}
emailRow = await emailService.completeReceive({ env }, account ? emailConst.status.RECEIVE : emailConst.status.NOONE, emailRow.emailId);
@@ -190,8 +196,8 @@ export async function email(message, env, ctx) {
}
} catch (e) {
console.error('邮件接收异常: ', e);
throw e
}
}