pull/273/head
xiaojunnuo 2024-12-11 11:37:52 +08:00
parent cdcdb6a2d9
commit e1e5347476
1 changed files with 5 additions and 1 deletions

View File

@ -88,10 +88,14 @@ export class EmailService implements IEmailService {
sysTitle = siteInfo.title || sysTitle;
}
}
let subject = email.subject;
if (!subject.startsWith(`${sysTitle}`)) {
subject = `${sysTitle}${subject}`;
}
const mailOptions = {
from: `${sysTitle} <${emailConfig.sender}>`,
to: email.receivers.join(', '), // list of receivers
subject: `${sysTitle}${email.subject}`,
subject: subject,
text: email.content,
};
await transporter.sendMail(mailOptions);