邮箱通知支持多个收件人

This commit is contained in:
whyour
2025-05-08 01:27:25 +08:00
parent d871585eee
commit 710a107e73
6 changed files with 17 additions and 8 deletions
+2 -2
View File
@@ -604,7 +604,7 @@ export default class NotificationService {
}
private async email() {
const { emailPass, emailService, emailUser } = this.params;
const { emailPass, emailService, emailUser, emailTo } = this.params;
try {
const transporter = nodemailer.createTransport({
@@ -617,7 +617,7 @@ export default class NotificationService {
const info = await transporter.sendMail({
from: `"青龙快讯" <${emailUser}>`,
to: `${emailUser}`,
to: emailTo ? emailTo.split(';') : emailUser,
subject: `${this.title}`,
html: `${this.content.replace(/\n/g, '<br/>')}`,
});