sitero 0.0.26 → 0.0.27
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.
|
@@ -3,11 +3,15 @@ function createSendEmail({
|
|
|
3
3
|
logger
|
|
4
4
|
}) {
|
|
5
5
|
return async function sendEmail(options) {
|
|
6
|
+
const normalizedOptions = {
|
|
7
|
+
...options,
|
|
8
|
+
to: options.to.trim()
|
|
9
|
+
};
|
|
6
10
|
try {
|
|
7
11
|
const info = await transporter.sendMail(options);
|
|
8
12
|
logger.info("Email sent", {
|
|
9
|
-
to:
|
|
10
|
-
subject:
|
|
13
|
+
to: normalizedOptions.to,
|
|
14
|
+
subject: normalizedOptions.subject,
|
|
11
15
|
messageId: info.messageId,
|
|
12
16
|
accepted: info.accepted,
|
|
13
17
|
rejected: info.rejected
|
|
@@ -15,8 +19,8 @@ function createSendEmail({
|
|
|
15
19
|
return info;
|
|
16
20
|
} catch (error) {
|
|
17
21
|
logger.error("Email failed", {
|
|
18
|
-
to:
|
|
19
|
-
subject:
|
|
22
|
+
to: normalizedOptions.to,
|
|
23
|
+
subject: normalizedOptions.subject,
|
|
20
24
|
error
|
|
21
25
|
});
|
|
22
26
|
throw error;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"send-email.d.ts","sourceRoot":"","sources":["../../../../../../../src/core/server/infrastructure/email/send-email.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,KAAK,iBAAiB,MAAM,mCAAmC,CAAC;AACvE,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,YAAY,CAAC;AAE9C,UAAU,gBAAgB;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;CACd;AAKD,wBAAgB,eAAe,CAAC,EAC9B,WAAW,EACX,MAAM,GACP,EAAE;IACD,WAAW,EAAE,WAAW,CAAC,iBAAiB,CAAC,eAAe,CAAC,CAAC;IAC5D,MAAM,EAAE,MAAM,CAAC;CAChB,IAEG,SAAS,gBAAgB,KACxB,OAAO,CAAC,iBAAiB,CAAC,eAAe,CAAC,
|
|
1
|
+
{"version":3,"file":"send-email.d.ts","sourceRoot":"","sources":["../../../../../../../src/core/server/infrastructure/email/send-email.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,KAAK,iBAAiB,MAAM,mCAAmC,CAAC;AACvE,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,YAAY,CAAC;AAE9C,UAAU,gBAAgB;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;CACd;AAKD,wBAAgB,eAAe,CAAC,EAC9B,WAAW,EACX,MAAM,GACP,EAAE;IACD,WAAW,EAAE,WAAW,CAAC,iBAAiB,CAAC,eAAe,CAAC,CAAC;IAC5D,MAAM,EAAE,MAAM,CAAC;CAChB,IAEG,SAAS,gBAAgB,KACxB,OAAO,CAAC,iBAAiB,CAAC,eAAe,CAAC,CA4B9C"}
|