refactor build and send

This commit is contained in:
Alex Holliday committed 2025-06-18 10:44:59 +08:00
1 parent 85e81184e5
commit 47131633d0
6 files changed
+132 -125

No files matched your search

+2 -6
View File
@@ -580,12 +580,8 @@ class MonitorController {
const subject = this.stringService.testEmailSubject;
const context = { testName: "Monitoring System" };
const messageId = await this.emailService.buildAndSendEmail(
"testEmailTemplate",
context,
to,
subject
);
const html = await this.emailService.buildEmail("testEmailTemplate", context);
const messageId = await this.emailService.sendEmail(to, subject, html);
if (!messageId) {
return res.error({