mirror of
https://github.com/schroinerxy/cloud-mail.git
synced 2026-06-21 19:35:50 +08:00
修复邮件接收异常
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -40,7 +40,6 @@ export const setting = sqliteTable('setting', {
|
||||
endpoint: text('endpoint').default('').notNull(),
|
||||
s3AccessKey: text('s3_access_key').default('').notNull(),
|
||||
s3SecretKey: text('s3_secret_key').default('').notNull(),
|
||||
kvStorage: integer('kv_storage').default(1).notNull(),
|
||||
forcePathStyle: integer('force_path_style').default(1).notNull(),
|
||||
customDomain: text('custom_domain').default('').notNull(),
|
||||
tgMsgFrom: text('tg_msg_from').default('only-name').notNull(),
|
||||
|
||||
@@ -30,14 +30,6 @@ const init = {
|
||||
return c.text(t('initSuccess'));
|
||||
},
|
||||
|
||||
async v2_7DB(c) {
|
||||
try {
|
||||
await c.env.db.prepare(`ALTER TABLE account ADD COLUMN all_receive INTEGER NOT NULL DEFAULT 0;`).run();
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
}
|
||||
},
|
||||
|
||||
async v2_6DB(c) {
|
||||
try {
|
||||
await c.env.db.prepare(`ALTER TABLE account ADD COLUMN all_receive INTEGER NOT NULL DEFAULT 0;`).run();
|
||||
|
||||
Reference in New Issue
Block a user