mirror of
https://github.com/schroinerxy/cloud-mail.git
synced 2026-06-21 19:35:50 +08:00
新增邮件转发
This commit is contained in:
@@ -23,6 +23,8 @@ const en = {
|
||||
noResendToken: 'Resend API token not configured',
|
||||
sendEmailNotCurUser: 'Sender email does not belong to current user',
|
||||
notExistEmailReply: 'Mail does not exist and cannot be replied to',
|
||||
imageAttLimit: 'The maximum number of image attachments is 10',
|
||||
attLimit: 'The maximum number of attachments is 10.',
|
||||
pwdLengthLimit: 'Password length exceeds the limit',
|
||||
emailLengthLimit: 'Email length exceeds the limit',
|
||||
minEmailPrefix: 'Email must be at least {{msg}} characters',
|
||||
|
||||
@@ -23,6 +23,8 @@ const zh = {
|
||||
noResendToken: 'resend密钥未配置',
|
||||
sendEmailNotCurUser: '发件人邮箱非当前用户所有',
|
||||
notExistEmailReply: '邮件不存在无法回复',
|
||||
imageAttLimit: '图片不能超过10个',
|
||||
attLimit: '附件不能超过10个',
|
||||
pwdLengthLimit: '密码长度超出限制',
|
||||
emailLengthLimit: '邮箱长度超出限制',
|
||||
minEmailPrefix: '邮箱名至少{{msg}}位',
|
||||
|
||||
@@ -179,6 +179,7 @@ const attService = {
|
||||
cacheControl: `max-age=259200`,
|
||||
contentDisposition: `inline;filename=${attData.filename}`
|
||||
});
|
||||
delete attData.buff;
|
||||
}
|
||||
|
||||
await orm(c).insert(att).values(attDataList).run();
|
||||
|
||||
@@ -331,11 +331,17 @@ const emailService = {
|
||||
|
||||
//保存内嵌附件
|
||||
if (imageDataList.length > 0) {
|
||||
if (imageDataList.length > 10) {
|
||||
throw new BizError(t('imageAttLimit'));
|
||||
}
|
||||
await attService.saveArticleAtt(c, imageDataList, userId, accountId, emailResult.emailId);
|
||||
}
|
||||
|
||||
//保存普通附件
|
||||
if (attachments?.length > 0) {
|
||||
if (attachments.length > 10) {
|
||||
throw new BizError(t('attLimit'));
|
||||
}
|
||||
await attService.saveSendAtt(c, attachments, userId, accountId, emailResult.emailId);
|
||||
}
|
||||
|
||||
|
||||
@@ -77,10 +77,10 @@ const settingService = {
|
||||
|
||||
|
||||
if (!showSiteKey) {
|
||||
settingRow.siteKey = settingRow.siteKey ? `${settingRow.siteKey.slice(0, 12)}******` : null;
|
||||
settingRow.siteKey = settingRow.siteKey ? `${settingRow.siteKey.slice(0, 6)}******` : null;
|
||||
}
|
||||
|
||||
settingRow.secretKey = settingRow.secretKey ? `${settingRow.secretKey.slice(0, 12)}******` : null;
|
||||
settingRow.secretKey = settingRow.secretKey ? `${settingRow.secretKey.slice(0, 6)}******` : null;
|
||||
|
||||
Object.keys(settingRow.resendTokens).forEach(key => {
|
||||
settingRow.resendTokens[key] = `${settingRow.resendTokens[key].slice(0, 12)}******`;
|
||||
|
||||
Reference in New Issue
Block a user