rez_core 2.2.185 → 2.2.186
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/module/notification/controller/otp.controller.d.ts +2 -2
- package/dist/module/notification/service/email.service.js +10 -5
- package/dist/module/notification/service/email.service.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/module/notification/controller/otp.controller.ts +2 -2
- package/src/module/notification/service/email.service.ts +15 -7
package/package.json
CHANGED
|
@@ -66,8 +66,8 @@ export class EmailService {
|
|
|
66
66
|
email: string,
|
|
67
67
|
subject: string,
|
|
68
68
|
templateCode: string,
|
|
69
|
-
cc
|
|
70
|
-
bcc
|
|
69
|
+
cc?: string[],
|
|
70
|
+
bcc?: string[],
|
|
71
71
|
message?: string,
|
|
72
72
|
context?: any,
|
|
73
73
|
icsPayload?: any,
|
|
@@ -104,15 +104,23 @@ export class EmailService {
|
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
-
|
|
108
|
-
await this.mailerService.sendMail({
|
|
107
|
+
const mailOptions: any = {
|
|
109
108
|
to: email,
|
|
110
|
-
cc: cc.length > 0 ? cc : undefined,
|
|
111
|
-
bcc: bcc.length > 0 ? bcc : undefined,
|
|
112
109
|
subject,
|
|
113
110
|
html: htmlContent,
|
|
114
111
|
attachments,
|
|
115
|
-
}
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
if (cc && cc.length > 0) {
|
|
115
|
+
mailOptions.cc = cc;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
if (bcc && bcc.length > 0) {
|
|
119
|
+
mailOptions.bcc = bcc;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
// Send the email
|
|
123
|
+
await this.mailerService.sendMail(mailOptions);
|
|
116
124
|
|
|
117
125
|
return { success: true, message: 'Email sent successfully' };
|
|
118
126
|
}
|