@strapi/provider-email-nodemailer
Advanced tools
Comparing version 0.0.0-next.e9bb5ccdc459f4c6b6717a2d5d86359b7a47d47d to 0.0.0-next.ee56af7ae29770097422de95c0d5500908dce15c
@@ -25,2 +25,3 @@ import nodemailer from 'nodemailer'; | ||
}; | ||
export = _default; | ||
export default _default; | ||
//# sourceMappingURL=index.d.ts.map |
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
const lodash_1 = __importDefault(require("lodash")); | ||
const nodemailer_1 = __importDefault(require("nodemailer")); | ||
const _ = require("lodash"); | ||
const nodemailer = require("nodemailer"); | ||
const _interopDefault = (e) => e && e.__esModule ? e : { default: e }; | ||
const ___default = /* @__PURE__ */ _interopDefault(_); | ||
const nodemailer__default = /* @__PURE__ */ _interopDefault(nodemailer); | ||
const emailFields = [ | ||
'from', | ||
'replyTo', | ||
'to', | ||
'cc', | ||
'bcc', | ||
'subject', | ||
'text', | ||
'html', | ||
'attachments', | ||
"from", | ||
"replyTo", | ||
"to", | ||
"cc", | ||
"bcc", | ||
"subject", | ||
"text", | ||
"html", | ||
"attachments" | ||
]; | ||
module.exports = { | ||
provider: 'nodemailer', | ||
name: 'Nodemailer', | ||
init(providerOptions, settings) { | ||
const transporter = nodemailer_1.default.createTransport(providerOptions); | ||
return { | ||
send(options) { | ||
// Default values. | ||
const emailOptions = { | ||
...lodash_1.default.pick(options, emailFields), | ||
from: options.from || settings.defaultFrom, | ||
replyTo: options.replyTo || settings.defaultReplyTo, | ||
text: options.text || options.html, | ||
html: options.html || options.text, | ||
}; | ||
return transporter.sendMail(emailOptions); | ||
}, | ||
const index = { | ||
provider: "nodemailer", | ||
name: "Nodemailer", | ||
init(providerOptions, settings) { | ||
const transporter = nodemailer__default.default.createTransport(providerOptions); | ||
return { | ||
send(options) { | ||
const emailOptions = { | ||
...___default.default.pick(options, emailFields), | ||
from: options.from || settings.defaultFrom, | ||
replyTo: options.replyTo || settings.defaultReplyTo, | ||
text: options.text || options.html, | ||
html: options.html || options.text | ||
}; | ||
}, | ||
return transporter.sendMail(emailOptions); | ||
} | ||
}; | ||
} | ||
}; | ||
//# sourceMappingURL=index.js.map | ||
module.exports = index; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@strapi/provider-email-nodemailer", | ||
"version": "0.0.0-next.e9bb5ccdc459f4c6b6717a2d5d86359b7a47d47d", | ||
"version": "0.0.0-next.ee56af7ae29770097422de95c0d5500908dce15c", | ||
"description": "Nodemailer provider for Strapi 3", | ||
@@ -45,13 +45,13 @@ "keywords": [ | ||
"main": "./dist/index.js", | ||
"module": "./dist/index.mjs", | ||
"source": "./src/index.ts", | ||
"types": "./dist/index.d.ts", | ||
"files": [ | ||
"./dist" | ||
"dist/" | ||
], | ||
"scripts": { | ||
"build": "run -T tsc", | ||
"build:ts": "run -T tsc", | ||
"watch": "run -T tsc -w --preserveWatchOutput", | ||
"build": "pack-up build", | ||
"clean": "run -T rimraf ./dist", | ||
"prepublishOnly": "yarn clean && yarn build", | ||
"lint": "run -T eslint ." | ||
"lint": "run -T eslint .", | ||
"watch": "pack-up watch" | ||
}, | ||
@@ -63,11 +63,12 @@ "dependencies": { | ||
"devDependencies": { | ||
"@strapi/pack-up": "5.0.0", | ||
"@types/nodemailer": "6.4.7", | ||
"eslint-config-custom": "0.0.0-next.e9bb5ccdc459f4c6b6717a2d5d86359b7a47d47d", | ||
"tsconfig": "0.0.0-next.e9bb5ccdc459f4c6b6717a2d5d86359b7a47d47d" | ||
"eslint-config-custom": "0.0.0-next.ee56af7ae29770097422de95c0d5500908dce15c", | ||
"tsconfig": "0.0.0-next.ee56af7ae29770097422de95c0d5500908dce15c" | ||
}, | ||
"engines": { | ||
"node": ">=14.19.1 <=18.x.x", | ||
"node": ">=18.0.0 <=22.x.x", | ||
"npm": ">=6.0.0" | ||
}, | ||
"gitHead": "e9bb5ccdc459f4c6b6717a2d5d86359b7a47d47d" | ||
"gitHead": "ee56af7ae29770097422de95c0d5500908dce15c" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
15554
9
99
4
1
80