mktcms 0.3.11 → 0.3.12

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.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mktcms",
3
3
  "configKey": "mktcms",
4
- "version": "0.3.11",
4
+ "version": "0.3.12",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
@@ -25,14 +25,17 @@ export async function sendMail({
25
25
  const finalText = templateText ? ejs.render(templateText, { fields }) : Object.entries(fields).map(([key, value]) => `${key}: ${value}`).join("\n");
26
26
  const mailOptions = {
27
27
  from: from || mailerFrom,
28
- envelope: {
29
- from: envelopeFrom || from || mailerFrom
30
- },
31
28
  to: to || mailerTo,
32
29
  replyTo: replyTo || void 0,
33
30
  subject,
34
31
  html: finalHtml,
35
32
  text: finalText
36
33
  };
34
+ if (envelopeFrom) {
35
+ mailOptions.envelope = {
36
+ from: envelopeFrom,
37
+ to: to || mailerTo
38
+ };
39
+ }
37
40
  return await transporter.sendMail(mailOptions);
38
41
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mktcms",
3
- "version": "0.3.11",
3
+ "version": "0.3.12",
4
4
  "description": "Simple CMS module for Nuxt",
5
5
  "repository": "mktcode/mktcms",
6
6
  "license": "MIT",