mktcms 0.1.11 → 0.1.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.1.11",
4
+ "version": "0.1.12",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
@@ -1,4 +1,5 @@
1
- export declare function sendMail({ subject, fields }: {
1
+ export declare function sendMail({ subject, fields, replyTo }: {
2
2
  subject: string;
3
3
  fields: Record<string, any>;
4
+ replyTo?: string;
4
5
  }): Promise<import("nodemailer/lib/smtp-transport").SentMessageInfo>;
@@ -1,6 +1,6 @@
1
1
  import nodemailer from "nodemailer";
2
2
  import { useRuntimeConfig } from "nitropack/runtime";
3
- export async function sendMail({ subject, fields }) {
3
+ export async function sendMail({ subject, fields, replyTo }) {
4
4
  const { mktcms: { smtpHost, smtpPort, smtpUser, smtpPass, smtpSecure, mailerFrom, mailerTo } } = useRuntimeConfig();
5
5
  const transporter = nodemailer.createTransport({
6
6
  host: smtpHost,
@@ -14,6 +14,7 @@ export async function sendMail({ subject, fields }) {
14
14
  const mailOptions = {
15
15
  from: mailerFrom,
16
16
  to: mailerTo,
17
+ replyTo: replyTo || void 0,
17
18
  subject,
18
19
  html: Object.entries(fields).map(([key, value]) => `<p><strong>${key}:</strong> ${value}</p>`).join(""),
19
20
  text: Object.entries(fields).map(([key, value]) => `${key}: ${value}`).join("\n")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mktcms",
3
- "version": "0.1.11",
3
+ "version": "0.1.12",
4
4
  "description": "Simple CMS module for Nuxt",
5
5
  "repository": "mktcode/mktcms",
6
6
  "license": "MIT",