This commit is contained in:
xiaojunnuo
2024-11-25 23:48:04 +08:00
parent c6fff4950d
commit 92c6c45e77
6 changed files with 26 additions and 6 deletions

View File

@@ -57,6 +57,10 @@ export class EmailService implements IEmailService {
async send(email: EmailSend) {
logger.info('sendEmail', email);
if (!email.receivers || email.receivers.length === 0) {
throw new Error('收件人不能为空');
}
const emailConf = await getEmailSettings(this.sysSettingsService, this.settingsService);
if (!emailConf.host && emailConf.usePlus == null) {