biz-email-builder-shared 1.6.46 → 1.6.47

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.
@@ -1 +1 @@
1
- {"version":3,"file":"sendMail.d.ts","sourceRoot":"","sources":["../../src/utilities/sendMail.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAIhD,wBAAsB,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,UAAU,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,CAAC,EAAE,MAAM,oEAqDtK"}
1
+ {"version":3,"file":"sendMail.d.ts","sourceRoot":"","sources":["../../src/utilities/sendMail.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAKhD,wBAAsB,QAAQ,CAC5B,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EACpC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAC7B,WAAW,EAAE,UAAU,EAAE,EAAE,MAAM,EAAE,OAAO,EAC1C,cAAc,CAAC,EAAE,MAAM,oEAqDxB"}
@@ -7,6 +7,7 @@ const sendMailViaEnvFallback_1 = require("./sendMailViaEnvFallback");
7
7
  const sendMailViaSMTP_1 = require("./sendMailViaSMTP");
8
8
  const errorHandler_1 = require("../resHandler/errorHandler");
9
9
  const sendFromGmail_1 = require("./sendFromGmail");
10
+ const cryptoUtils_1 = require("./cryptoUtils");
10
11
  async function sendMail(userId, recipient, subject, body, attachments, isHtml, organisationId) {
11
12
  let config = null;
12
13
  let isOwner;
@@ -35,7 +36,7 @@ async function sendMail(userId, recipient, subject, body, attachments, isHtml, o
35
36
  if (config.method === entity_1.CONFIG_METHOD.GMAIL && config.gmailConfig) {
36
37
  const gmailConfig = {
37
38
  email: config.gmailConfig.email,
38
- password: config.gmailConfig.password,
39
+ password: (0, cryptoUtils_1.decrypt)(config.gmailConfig.password),
39
40
  };
40
41
  return (0, sendFromGmail_1.sendFromGmail)(gmailConfig, recipient, subject, body, attachments, isHtml);
41
42
  }
@@ -45,7 +46,7 @@ async function sendMail(userId, recipient, subject, body, attachments, isHtml, o
45
46
  port: config.smtpConfig.port,
46
47
  secure: config.smtpConfig.secure,
47
48
  userName: config.smtpConfig.userName,
48
- password: config.smtpConfig.password,
49
+ password: (0, cryptoUtils_1.decrypt)(config.smtpConfig.password),
49
50
  fromEmail: config.smtpConfig.fromEmail,
50
51
  fromName: config.smtpConfig.fromName,
51
52
  encriptionMethod: config.smtpConfig.encriptionMethod,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "biz-email-builder-shared",
3
- "version": "1.6.46",
3
+ "version": "1.6.47",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [