@strapi/provider-email-nodemailer
Advanced tools
Comparing version 0.0.0-next.83d394f47f5b5ee11b31f535997dd73358434317 to 0.0.0-next.840550dc97a3782302ddf918d3a0d07e59dd11eb
@@ -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.83d394f47f5b5ee11b31f535997dd73358434317", | ||
"version": "0.0.0-next.840550dc97a3782302ddf918d3a0d07e59dd11eb", | ||
"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.83d394f47f5b5ee11b31f535997dd73358434317", | ||
"tsconfig": "0.0.0-next.83d394f47f5b5ee11b31f535997dd73358434317" | ||
"eslint-config-custom": "0.0.0-next.840550dc97a3782302ddf918d3a0d07e59dd11eb", | ||
"tsconfig": "0.0.0-next.840550dc97a3782302ddf918d3a0d07e59dd11eb" | ||
}, | ||
"engines": { | ||
"node": ">=14.19.1 <=18.x.x", | ||
"node": ">=18.0.0 <=20.x.x", | ||
"npm": ">=6.0.0" | ||
}, | ||
"gitHead": "83d394f47f5b5ee11b31f535997dd73358434317" | ||
"gitHead": "840550dc97a3782302ddf918d3a0d07e59dd11eb" | ||
} |
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