@strapi/email 5.61.1 → 5.63.0
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/admin/index.js +0 -2
- package/dist/admin/index.js.map +1 -1
- package/dist/admin/index.mjs +0 -2
- package/dist/admin/index.mjs.map +1 -1
- package/dist/server/controllers/email.js +12 -2
- package/dist/server/controllers/email.js.map +1 -1
- package/dist/server/controllers/email.mjs +12 -2
- package/dist/server/controllers/email.mjs.map +1 -1
- package/dist/server/routes/validation/email.js +7 -2
- package/dist/server/routes/validation/email.js.map +1 -1
- package/dist/server/routes/validation/email.mjs +7 -2
- package/dist/server/routes/validation/email.mjs.map +1 -1
- package/dist/server/services/email.js +5 -1
- package/dist/server/services/email.js.map +1 -1
- package/dist/server/services/email.mjs +5 -1
- package/dist/server/services/email.mjs.map +1 -1
- package/dist/server/src/controllers/email.d.ts.map +1 -1
- package/dist/server/src/routes/validation/email.d.ts +7 -1
- package/dist/server/src/routes/validation/email.d.ts.map +1 -1
- package/dist/server/src/services/email.d.ts.map +1 -1
- package/package.json +16 -12
package/dist/admin/index.js
CHANGED
|
@@ -40,7 +40,6 @@ function __variableDynamicImportRuntime1__(path) {
|
|
|
40
40
|
}
|
|
41
41
|
const admin = {
|
|
42
42
|
// TODO typing app in strapi/types as every plugin needs it
|
|
43
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
44
43
|
register (app) {
|
|
45
44
|
// Create the email settings section
|
|
46
45
|
app.addSettingsLink({
|
|
@@ -66,7 +65,6 @@ const admin = {
|
|
|
66
65
|
name: 'email'
|
|
67
66
|
});
|
|
68
67
|
},
|
|
69
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
70
68
|
bootstrap () {},
|
|
71
69
|
async registerTrads ({ locales }) {
|
|
72
70
|
const importedTrads = await Promise.all(locales.map((locale)=>{
|
package/dist/admin/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../admin/src/index.ts"],"sourcesContent":["import { PERMISSIONS } from './constants';\nimport { prefixPluginTranslations } from './utils/prefixPluginTranslations';\n\nimport type { StrapiApp } from '@strapi/admin/strapi-admin';\nimport type { Plugin } from '@strapi/types';\n\nconst admin: Plugin.Config.AdminInput = {\n // TODO typing app in strapi/types as every plugin needs it\n
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../admin/src/index.ts"],"sourcesContent":["import { PERMISSIONS } from './constants';\nimport { prefixPluginTranslations } from './utils/prefixPluginTranslations';\n\nimport type { StrapiApp } from '@strapi/admin/strapi-admin';\nimport type { Plugin } from '@strapi/types';\n\nconst admin: Plugin.Config.AdminInput = {\n // TODO typing app in strapi/types as every plugin needs it\n register(app: StrapiApp) {\n // Create the email settings section\n app.addSettingsLink(\n {\n id: 'email',\n intlLabel: { id: 'email.SettingsNav.section-label', defaultMessage: 'Email Plugin' },\n },\n {\n intlLabel: {\n id: 'email.Settings.email.plugin.title',\n defaultMessage: 'Settings',\n },\n id: 'settings',\n to: 'email',\n Component: () =>\n import('./pages/Settings').then((mod) => ({\n default: mod.ProtectedSettingsPage,\n })),\n permissions: PERMISSIONS.settings,\n }\n );\n app.registerPlugin({\n id: 'email',\n name: 'email',\n });\n },\n bootstrap() {},\n async registerTrads({ locales }: { locales: string[] }) {\n const importedTrads = await Promise.all(\n locales.map((locale) => {\n return import(`./translations/${locale}.json`)\n .then(({ default: data }) => {\n return {\n data: prefixPluginTranslations(data, 'email'),\n locale,\n };\n })\n .catch(() => {\n return {\n data: {},\n locale,\n };\n });\n })\n );\n\n return Promise.resolve(importedTrads);\n },\n};\n\n// eslint-disable-next-line import/no-default-export\nexport default admin;\n"],"names":["admin","register","app","addSettingsLink","id","intlLabel","defaultMessage","to","Component","then","mod","default","ProtectedSettingsPage","permissions","PERMISSIONS","settings","registerPlugin","name","bootstrap","registerTrads","locales","importedTrads","Promise","all","map","locale","data","prefixPluginTranslations","catch","resolve"],"mappings":";;;;;;;;;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oBAAAA,IAAAA,EAAM,EAAC;AACPD,oBAAAA;AACF,iBAAA;AACF,YAAA,CAAA,CAAA;AACJ,QAAA,CAAA,CAAA,CAAA;QAGF,OAAOH,OAAAA,CAAQO,OAAO,CAACR,aAAAA,CAAAA;AACzB,IAAA;AACF;;;;"}
|
package/dist/admin/index.mjs
CHANGED
|
@@ -36,7 +36,6 @@ function __variableDynamicImportRuntime1__(path) {
|
|
|
36
36
|
}
|
|
37
37
|
const admin = {
|
|
38
38
|
// TODO typing app in strapi/types as every plugin needs it
|
|
39
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
40
39
|
register (app) {
|
|
41
40
|
// Create the email settings section
|
|
42
41
|
app.addSettingsLink({
|
|
@@ -62,7 +61,6 @@ const admin = {
|
|
|
62
61
|
name: 'email'
|
|
63
62
|
});
|
|
64
63
|
},
|
|
65
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
66
64
|
bootstrap () {},
|
|
67
65
|
async registerTrads ({ locales }) {
|
|
68
66
|
const importedTrads = await Promise.all(locales.map((locale)=>{
|
package/dist/admin/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../admin/src/index.ts"],"sourcesContent":["import { PERMISSIONS } from './constants';\nimport { prefixPluginTranslations } from './utils/prefixPluginTranslations';\n\nimport type { StrapiApp } from '@strapi/admin/strapi-admin';\nimport type { Plugin } from '@strapi/types';\n\nconst admin: Plugin.Config.AdminInput = {\n // TODO typing app in strapi/types as every plugin needs it\n
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../admin/src/index.ts"],"sourcesContent":["import { PERMISSIONS } from './constants';\nimport { prefixPluginTranslations } from './utils/prefixPluginTranslations';\n\nimport type { StrapiApp } from '@strapi/admin/strapi-admin';\nimport type { Plugin } from '@strapi/types';\n\nconst admin: Plugin.Config.AdminInput = {\n // TODO typing app in strapi/types as every plugin needs it\n register(app: StrapiApp) {\n // Create the email settings section\n app.addSettingsLink(\n {\n id: 'email',\n intlLabel: { id: 'email.SettingsNav.section-label', defaultMessage: 'Email Plugin' },\n },\n {\n intlLabel: {\n id: 'email.Settings.email.plugin.title',\n defaultMessage: 'Settings',\n },\n id: 'settings',\n to: 'email',\n Component: () =>\n import('./pages/Settings').then((mod) => ({\n default: mod.ProtectedSettingsPage,\n })),\n permissions: PERMISSIONS.settings,\n }\n );\n app.registerPlugin({\n id: 'email',\n name: 'email',\n });\n },\n bootstrap() {},\n async registerTrads({ locales }: { locales: string[] }) {\n const importedTrads = await Promise.all(\n locales.map((locale) => {\n return import(`./translations/${locale}.json`)\n .then(({ default: data }) => {\n return {\n data: prefixPluginTranslations(data, 'email'),\n locale,\n };\n })\n .catch(() => {\n return {\n data: {},\n locale,\n };\n });\n })\n );\n\n return Promise.resolve(importedTrads);\n },\n};\n\n// eslint-disable-next-line import/no-default-export\nexport default admin;\n"],"names":["admin","register","app","addSettingsLink","id","intlLabel","defaultMessage","to","Component","then","mod","default","ProtectedSettingsPage","permissions","PERMISSIONS","settings","registerPlugin","name","bootstrap","registerTrads","locales","importedTrads","Promise","all","map","locale","data","prefixPluginTranslations","catch","resolve"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,MAAMA,KAAAA,GAAkC;;AAEtCC,IAAAA,QAAAA,CAAAA,CAASC,GAAc,EAAA;;AAErBA,QAAAA,GAAAA,CAAIC,eAAe,CACjB;YACEC,EAAAA,EAAI,OAAA;YACJC,SAAAA,EAAW;gBAAED,EAAAA,EAAI,iCAAA;gBAAmCE,cAAAA,EAAgB;AAAe;SACrF,EACA;YACED,SAAAA,EAAW;gBACTD,EAAAA,EAAI,mCAAA;gBACJE,cAAAA,EAAgB;AAClB,aAAA;YACAF,EAAAA,EAAI,UAAA;YACJG,EAAAA,EAAI,OAAA;YACJC,SAAAA,EAAW,IACT,OAAO,sBAAA,CAAA,CAAoBC,IAAI,CAAC,CAACC,OAAS;AACxCC,wBAAAA,OAAAA,EAASD,IAAIE;qBACf,CAAA,CAAA;AACFC,YAAAA,WAAAA,EAAaC,YAAYC;AAC3B,SAAA,CAAA;AAEFb,QAAAA,GAAAA,CAAIc,cAAc,CAAC;YACjBZ,EAAAA,EAAI,OAAA;YACJa,IAAAA,EAAM;AACR,SAAA,CAAA;AACF,IAAA,CAAA;IACAC,SAAAA,CAAAA,GAAAA,CAAa,CAAA;IACb,MAAMC,aAAAA,CAAAA,CAAc,EAAEC,OAAO,EAAyB,EAAA;QACpD,MAAMC,aAAAA,GAAgB,MAAMC,OAAAA,CAAQC,GAAG,CACrCH,OAAAA,CAAQI,GAAG,CAAC,CAACC,MAAAA,GAAAA;AACX,YAAA,OAAO,iCAAM,CAAC,CAAC,eAAe,EAAEA,MAAAA,CAAO,KAAK,CAAC,CAAA,CAC1ChB,IAAI,CAAC,CAAC,EAAEE,OAAAA,EAASe,IAAI,EAAE,GAAA;gBACtB,OAAO;AACLA,oBAAAA,IAAAA,EAAMC,yBAAyBD,IAAAA,EAAM,OAAA,CAAA;AACrCD,oBAAAA;AACF,iBAAA;AACF,YAAA,CAAA,CAAA,CACCG,KAAK,CAAC,IAAA;gBACL,OAAO;AACLF,oBAAAA,IAAAA,EAAM,EAAC;AACPD,oBAAAA;AACF,iBAAA;AACF,YAAA,CAAA,CAAA;AACJ,QAAA,CAAA,CAAA,CAAA;QAGF,OAAOH,OAAAA,CAAQO,OAAO,CAACR,aAAAA,CAAAA;AACzB,IAAA;AACF;;;;"}
|
|
@@ -3,14 +3,24 @@
|
|
|
3
3
|
var lodash = require('lodash');
|
|
4
4
|
var utils = require('@strapi/utils');
|
|
5
5
|
|
|
6
|
-
const { ApplicationError } = utils.errors;
|
|
6
|
+
const { ApplicationError, ValidationError } = utils.errors;
|
|
7
|
+
const isPlainObject = (value)=>typeof value === 'object' && value !== null && Array.isArray(value) === false;
|
|
7
8
|
/**
|
|
8
9
|
* Email.js controller
|
|
9
10
|
*
|
|
10
11
|
* @description: A set of functions called "actions" of the `email` plugin.
|
|
11
12
|
*/ const emailController = {
|
|
12
13
|
async send (ctx) {
|
|
13
|
-
const
|
|
14
|
+
const { body } = ctx.request;
|
|
15
|
+
// The body passes to the provider unchanged: providers accept their own shapes (template
|
|
16
|
+
// sends, recipient arrays, provider options). Only a non-object body is rejected.
|
|
17
|
+
// TODO @Nico enforcing the documented `SendOptions` contract (strings, required `to`,
|
|
18
|
+
// `subject`, `text`) is a breaking change for provider-specific shapes; it needs a future
|
|
19
|
+
// flag or a major release.
|
|
20
|
+
if (isPlainObject(body) === false) {
|
|
21
|
+
throw new ValidationError('The email body must be a JSON object');
|
|
22
|
+
}
|
|
23
|
+
const options = body;
|
|
14
24
|
try {
|
|
15
25
|
await strapi.plugin('email').service('email').send(options);
|
|
16
26
|
} catch (error) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"email.js","sources":["../../../server/src/controllers/email.ts"],"sourcesContent":["import { pick } from 'lodash';\nimport { errors } from '@strapi/utils';\n\nimport type Koa from 'koa';\nimport type {} from 'koa-body';\nimport type { EmailConfig, SendOptions } from '../types';\n\nconst { ApplicationError } = errors;\n\n/**\n * Email.js controller\n *\n * @description: A set of functions called \"actions\" of the `email` plugin.\n */\nconst emailController = {\n async send(ctx: Koa.Context) {\n const
|
|
1
|
+
{"version":3,"file":"email.js","sources":["../../../server/src/controllers/email.ts"],"sourcesContent":["import { pick } from 'lodash';\nimport { errors } from '@strapi/utils';\n\nimport type Koa from 'koa';\nimport type {} from 'koa-body';\nimport type { EmailConfig, SendOptions } from '../types';\n\nconst { ApplicationError, ValidationError } = errors;\n\nconst isPlainObject = (value: unknown): value is Record<string, unknown> =>\n typeof value === 'object' && value !== null && Array.isArray(value) === false;\n\n/**\n * Email.js controller\n *\n * @description: A set of functions called \"actions\" of the `email` plugin.\n */\nconst emailController = {\n async send(ctx: Koa.Context) {\n const { body } = ctx.request;\n\n // The body passes to the provider unchanged: providers accept their own shapes (template\n // sends, recipient arrays, provider options). Only a non-object body is rejected.\n // TODO @Nico enforcing the documented `SendOptions` contract (strings, required `to`,\n // `subject`, `text`) is a breaking change for provider-specific shapes; it needs a future\n // flag or a major release.\n if (isPlainObject(body) === false) {\n throw new ValidationError('The email body must be a JSON object');\n }\n\n const options = body as SendOptions;\n\n try {\n await strapi.plugin('email').service('email').send(options);\n } catch (error) {\n if (error instanceof Error) {\n if ('statusCode' in error && error.statusCode === 400) {\n throw new ApplicationError(error.message);\n } else {\n throw new Error(`Couldn't send email: ${error.message}.`);\n }\n }\n }\n\n // Send 200 `ok`\n ctx.send({});\n },\n\n async test(ctx: Koa.Context) {\n const { to } = ctx.request.body as Pick<SendOptions, 'to'>;\n\n if (!to) {\n throw new ApplicationError('No recipient(s) are given');\n }\n\n const email: SendOptions = {\n to,\n subject: `Strapi test mail to: ${to}`,\n text: `Great! You have correctly configured the Strapi email plugin with the ${strapi.config.get(\n 'plugin::email.provider'\n )} provider. \\r\\nFor documentation on how to use the email plugin checkout: https://docs.strapi.io/developer-docs/latest/plugins/email.html`,\n };\n\n try {\n await strapi.plugin('email').service('email').send(email);\n } catch (error) {\n if (error instanceof Error) {\n if ('statusCode' in error && error.statusCode === 400) {\n throw new ApplicationError(error.message);\n } else {\n throw new Error(`Couldn't send test email: ${error.message}.`);\n }\n }\n }\n\n // Send 200 `ok`\n ctx.send({});\n },\n\n async getSettings(ctx: Koa.Context) {\n const config: EmailConfig = strapi.plugin('email').service('email').getProviderSettings();\n const provider = strapi.plugin('email').provider;\n\n // Check if provider supports verify method\n const supportsVerify = typeof provider?.verify === 'function';\n\n // Get capabilities from provider (e.g. SMTP host, auth type, features)\n const capabilities =\n typeof provider?.getCapabilities === 'function' ? provider.getCapabilities() : undefined;\n\n // Get pool idle status if provider supports it\n const isIdle = typeof provider?.isIdle === 'function' ? provider.isIdle() : undefined;\n\n ctx.send({\n config: pick(config, [\n 'provider',\n 'settings.defaultFrom',\n 'settings.defaultReplyTo',\n 'settings.testAddress',\n ]),\n supportsVerify,\n ...(capabilities ? { capabilities } : {}),\n ...(isIdle !== undefined ? { isIdle } : {}),\n });\n },\n\n async verify(ctx: Koa.Context) {\n const provider = strapi.plugin('email').provider;\n\n if (!provider?.verify || typeof provider.verify !== 'function') {\n throw new ApplicationError('This email provider does not support connection verification');\n }\n\n try {\n await provider.verify();\n ctx.send({ success: true, message: 'SMTP connection verified successfully' });\n } catch (error) {\n if (error instanceof Error) {\n throw new ApplicationError(`Connection verification failed: ${error.message}`);\n }\n throw new ApplicationError('Connection verification failed');\n }\n },\n};\n\nexport default emailController;\n"],"names":["ApplicationError","ValidationError","errors","isPlainObject","value","Array","isArray","emailController","send","ctx","body","request","options","strapi","plugin","service","error","Error","statusCode","message","test","to","email","subject","text","config","get","getSettings","getProviderSettings","provider","supportsVerify","verify","capabilities","getCapabilities","undefined","isIdle","pick","success"],"mappings":";;;;;AAOA,MAAM,EAAEA,gBAAgB,EAAEC,eAAe,EAAE,GAAGC,YAAAA;AAE9C,MAAMC,aAAAA,GAAgB,CAACC,KAAAA,GACrB,OAAOA,KAAAA,KAAU,QAAA,IAAYA,KAAAA,KAAU,IAAA,IAAQC,KAAAA,CAAMC,OAAO,CAACF,KAAAA,CAAAA,KAAW,KAAA;AAE1E;;;;AAIC,UACKG,eAAAA,GAAkB;AACtB,IAAA,MAAMC,MAAKC,GAAgB,EAAA;AACzB,QAAA,MAAM,EAAEC,IAAI,EAAE,GAAGD,IAAIE,OAAO;;;;;;QAO5B,IAAIR,aAAAA,CAAcO,UAAU,KAAA,EAAO;AACjC,YAAA,MAAM,IAAIT,eAAAA,CAAgB,sCAAA,CAAA;AAC5B,QAAA;AAEA,QAAA,MAAMW,OAAAA,GAAUF,IAAAA;QAEhB,IAAI;YACF,MAAMG,MAAAA,CAAOC,MAAM,CAAC,OAAA,CAAA,CAASC,OAAO,CAAC,OAAA,CAAA,CAASP,IAAI,CAACI,OAAAA,CAAAA;AACrD,QAAA,CAAA,CAAE,OAAOI,KAAAA,EAAO;AACd,YAAA,IAAIA,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AU,OAAOF,QAAAA,CAASE,MAAM,KAAK,UAAA,EAAY;AAC9D,YAAA,MAAM,IAAI/B,gBAAAA,CAAiB,8DAAA,CAAA;AAC7B,QAAA;QAEA,IAAI;AACF,YAAA,MAAM6B,SAASE,MAAM,EAAA;AACrBtB,YAAAA,GAAAA,CAAID,IAAI,CAAC;gBAAE6B,OAAAA,EAAS,IAAA;gBAAMlB,OAAAA,EAAS;AAAwC,aAAA,CAAA;AAC7E,QAAA,CAAA,CAAE,OAAOH,KAAAA,EAAO;AACd,YAAA,IAAIA,iBAAiBC,KAAAA,EAAO;AAC1B,gBAAA,MAAM,IAAIjB,gBAAAA,CAAiB,CAAC,gCAAgC,EAAEgB,KAAAA,CAAMG,OAAO,CAAA,CAAE,CAAA;AAC/E,YAAA;AACA,YAAA,MAAM,IAAInB,gBAAAA,CAAiB,gCAAA,CAAA;AAC7B,QAAA;AACF,IAAA;AACF;;;;"}
|
|
@@ -1,14 +1,24 @@
|
|
|
1
1
|
import { pick } from 'lodash';
|
|
2
2
|
import { errors } from '@strapi/utils';
|
|
3
3
|
|
|
4
|
-
const { ApplicationError } = errors;
|
|
4
|
+
const { ApplicationError, ValidationError } = errors;
|
|
5
|
+
const isPlainObject = (value)=>typeof value === 'object' && value !== null && Array.isArray(value) === false;
|
|
5
6
|
/**
|
|
6
7
|
* Email.js controller
|
|
7
8
|
*
|
|
8
9
|
* @description: A set of functions called "actions" of the `email` plugin.
|
|
9
10
|
*/ const emailController = {
|
|
10
11
|
async send (ctx) {
|
|
11
|
-
const
|
|
12
|
+
const { body } = ctx.request;
|
|
13
|
+
// The body passes to the provider unchanged: providers accept their own shapes (template
|
|
14
|
+
// sends, recipient arrays, provider options). Only a non-object body is rejected.
|
|
15
|
+
// TODO @Nico enforcing the documented `SendOptions` contract (strings, required `to`,
|
|
16
|
+
// `subject`, `text`) is a breaking change for provider-specific shapes; it needs a future
|
|
17
|
+
// flag or a major release.
|
|
18
|
+
if (isPlainObject(body) === false) {
|
|
19
|
+
throw new ValidationError('The email body must be a JSON object');
|
|
20
|
+
}
|
|
21
|
+
const options = body;
|
|
12
22
|
try {
|
|
13
23
|
await strapi.plugin('email').service('email').send(options);
|
|
14
24
|
} catch (error) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"email.mjs","sources":["../../../server/src/controllers/email.ts"],"sourcesContent":["import { pick } from 'lodash';\nimport { errors } from '@strapi/utils';\n\nimport type Koa from 'koa';\nimport type {} from 'koa-body';\nimport type { EmailConfig, SendOptions } from '../types';\n\nconst { ApplicationError } = errors;\n\n/**\n * Email.js controller\n *\n * @description: A set of functions called \"actions\" of the `email` plugin.\n */\nconst emailController = {\n async send(ctx: Koa.Context) {\n const
|
|
1
|
+
{"version":3,"file":"email.mjs","sources":["../../../server/src/controllers/email.ts"],"sourcesContent":["import { pick } from 'lodash';\nimport { errors } from '@strapi/utils';\n\nimport type Koa from 'koa';\nimport type {} from 'koa-body';\nimport type { EmailConfig, SendOptions } from '../types';\n\nconst { ApplicationError, ValidationError } = errors;\n\nconst isPlainObject = (value: unknown): value is Record<string, unknown> =>\n typeof value === 'object' && value !== null && Array.isArray(value) === false;\n\n/**\n * Email.js controller\n *\n * @description: A set of functions called \"actions\" of the `email` plugin.\n */\nconst emailController = {\n async send(ctx: Koa.Context) {\n const { body } = ctx.request;\n\n // The body passes to the provider unchanged: providers accept their own shapes (template\n // sends, recipient arrays, provider options). Only a non-object body is rejected.\n // TODO @Nico enforcing the documented `SendOptions` contract (strings, required `to`,\n // `subject`, `text`) is a breaking change for provider-specific shapes; it needs a future\n // flag or a major release.\n if (isPlainObject(body) === false) {\n throw new ValidationError('The email body must be a JSON object');\n }\n\n const options = body as SendOptions;\n\n try {\n await strapi.plugin('email').service('email').send(options);\n } catch (error) {\n if (error instanceof Error) {\n if ('statusCode' in error && error.statusCode === 400) {\n throw new ApplicationError(error.message);\n } else {\n throw new Error(`Couldn't send email: ${error.message}.`);\n }\n }\n }\n\n // Send 200 `ok`\n ctx.send({});\n },\n\n async test(ctx: Koa.Context) {\n const { to } = ctx.request.body as Pick<SendOptions, 'to'>;\n\n if (!to) {\n throw new ApplicationError('No recipient(s) are given');\n }\n\n const email: SendOptions = {\n to,\n subject: `Strapi test mail to: ${to}`,\n text: `Great! You have correctly configured the Strapi email plugin with the ${strapi.config.get(\n 'plugin::email.provider'\n )} provider. \\r\\nFor documentation on how to use the email plugin checkout: https://docs.strapi.io/developer-docs/latest/plugins/email.html`,\n };\n\n try {\n await strapi.plugin('email').service('email').send(email);\n } catch (error) {\n if (error instanceof Error) {\n if ('statusCode' in error && error.statusCode === 400) {\n throw new ApplicationError(error.message);\n } else {\n throw new Error(`Couldn't send test email: ${error.message}.`);\n }\n }\n }\n\n // Send 200 `ok`\n ctx.send({});\n },\n\n async getSettings(ctx: Koa.Context) {\n const config: EmailConfig = strapi.plugin('email').service('email').getProviderSettings();\n const provider = strapi.plugin('email').provider;\n\n // Check if provider supports verify method\n const supportsVerify = typeof provider?.verify === 'function';\n\n // Get capabilities from provider (e.g. SMTP host, auth type, features)\n const capabilities =\n typeof provider?.getCapabilities === 'function' ? provider.getCapabilities() : undefined;\n\n // Get pool idle status if provider supports it\n const isIdle = typeof provider?.isIdle === 'function' ? provider.isIdle() : undefined;\n\n ctx.send({\n config: pick(config, [\n 'provider',\n 'settings.defaultFrom',\n 'settings.defaultReplyTo',\n 'settings.testAddress',\n ]),\n supportsVerify,\n ...(capabilities ? { capabilities } : {}),\n ...(isIdle !== undefined ? { isIdle } : {}),\n });\n },\n\n async verify(ctx: Koa.Context) {\n const provider = strapi.plugin('email').provider;\n\n if (!provider?.verify || typeof provider.verify !== 'function') {\n throw new ApplicationError('This email provider does not support connection verification');\n }\n\n try {\n await provider.verify();\n ctx.send({ success: true, message: 'SMTP connection verified successfully' });\n } catch (error) {\n if (error instanceof Error) {\n throw new ApplicationError(`Connection verification failed: ${error.message}`);\n }\n throw new ApplicationError('Connection verification failed');\n }\n },\n};\n\nexport default emailController;\n"],"names":["ApplicationError","ValidationError","errors","isPlainObject","value","Array","isArray","emailController","send","ctx","body","request","options","strapi","plugin","service","error","Error","statusCode","message","test","to","email","subject","text","config","get","getSettings","getProviderSettings","provider","supportsVerify","verify","capabilities","getCapabilities","undefined","isIdle","pick","success"],"mappings":";;;AAOA,MAAM,EAAEA,gBAAgB,EAAEC,eAAe,EAAE,GAAGC,MAAAA;AAE9C,MAAMC,aAAAA,GAAgB,CAACC,KAAAA,GACrB,OAAOA,KAAAA,KAAU,QAAA,IAAYA,KAAAA,KAAU,IAAA,IAAQC,KAAAA,CAAMC,OAAO,CAACF,KAAAA,CAAAA,KAAW,KAAA;AAE1E;;;;AAIC,UACKG,eAAAA,GAAkB;AACtB,IAAA,MAAMC,MAAKC,GAAgB,EAAA;AACzB,QAAA,MAAM,EAAEC,IAAI,EAAE,GAAGD,IAAIE,OAAO;;;;;;QAO5B,IAAIR,aAAAA,CAAcO,UAAU,KAAA,EAAO;AACjC,YAAA,MAAM,IAAIT,eAAAA,CAAgB,sCAAA,CAAA;AAC5B,QAAA;AAEA,QAAA,MAAMW,OAAAA,GAAUF,IAAAA;QAEhB,IAAI;YACF,MAAMG,MAAAA,CAAOC,MAAM,CAAC,OAAA,CAAA,CAASC,OAAO,CAAC,OAAA,CAAA,CAASP,IAAI,CAACI,OAAAA,CAAAA;AACrD,QAAA,CAAA,CAAE,OAAOI,KAAAA,EAAO;AACd,YAAA,IAAIA,iBAAiBC,KAAAA,EAAO;AAC1B,gBAAA,IAAI,YAAA,IAAgBD,KAAAA,IAASA,KAAAA,CAAME,UAAU,KAAK,GAAA,EAAK;oBACrD,MAAM,IAAIlB,gBAAAA,CAAiBgB,KAAAA,CAAMG,OAAO,CAAA;gBAC1C,CAAA,MAAO;oBACL,MAAM,IAAIF,MAAM,CAAC,qBAAqB,EAAED,KAAAA,CAAMG,OAAO,CAAC,CAAC,CAAC,CAAA;AAC1D,gBAAA;AACF,YAAA;AACF,QAAA;;QAGAV,GAAAA,CAAID,IAAI,C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C,KAAAA,EAAO;AAC1B,gBAAA,MAAM,IAAIjB,gBAAAA,CAAiB,CAAC,gCAAgC,EAAEgB,KAAAA,CAAMG,OAAO,CAAA,CAAE,CAAA;AAC/E,YAAA;AACA,YAAA,MAAM,IAAInB,gBAAAA,CAAiB,gCAAA,CAAA;AAC7B,QAAA;AACF,IAAA;AACF;;;;"}
|
|
@@ -23,7 +23,12 @@ function _interopNamespace(e) {
|
|
|
23
23
|
var z__namespace = /*#__PURE__*/_interopNamespace(z);
|
|
24
24
|
|
|
25
25
|
class EmailRouteValidator {
|
|
26
|
-
|
|
26
|
+
/**
|
|
27
|
+
* OpenAPI description of the documented `send` fields. Additional keys are provider options
|
|
28
|
+
* (attachments, headers, template data…).
|
|
29
|
+
* The `send` handler does not validate against it: it rejects only a non-object body and
|
|
30
|
+
* passes every field to the provider unchanged.
|
|
31
|
+
*/ get sendEmailInput() {
|
|
27
32
|
return z__namespace.object({
|
|
28
33
|
from: z__namespace.string().optional(),
|
|
29
34
|
to: z__namespace.string(),
|
|
@@ -33,7 +38,7 @@ class EmailRouteValidator {
|
|
|
33
38
|
subject: z__namespace.string(),
|
|
34
39
|
text: z__namespace.string(),
|
|
35
40
|
html: z__namespace.string().optional()
|
|
36
|
-
}).catchall(z__namespace.
|
|
41
|
+
}).catchall(z__namespace.unknown());
|
|
37
42
|
}
|
|
38
43
|
get emailResponse() {
|
|
39
44
|
return z__namespace.object({});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"email.js","sources":["../../../../server/src/routes/validation/email.ts"],"sourcesContent":["import type { Core } from '@strapi/types';\nimport * as z from 'zod/v4';\n\nexport class EmailRouteValidator {\n protected readonly _strapi: Core.Strapi;\n\n public constructor(strapi: Core.Strapi) {\n this._strapi = strapi;\n }\n\n get sendEmailInput() {\n return z\n .object({\n from: z.string().optional(),\n to: z.string(),\n cc: z.string().optional(),\n bcc: z.string().optional(),\n replyTo: z.string().optional(),\n subject: z.string(),\n text: z.string(),\n html: z.string().optional(),\n })\n .catchall(z.
|
|
1
|
+
{"version":3,"file":"email.js","sources":["../../../../server/src/routes/validation/email.ts"],"sourcesContent":["import type { Core } from '@strapi/types';\nimport * as z from 'zod/v4';\n\nexport class EmailRouteValidator {\n protected readonly _strapi: Core.Strapi;\n\n public constructor(strapi: Core.Strapi) {\n this._strapi = strapi;\n }\n\n /**\n * OpenAPI description of the documented `send` fields. Additional keys are provider options\n * (attachments, headers, template data…).\n * The `send` handler does not validate against it: it rejects only a non-object body and\n * passes every field to the provider unchanged.\n */\n get sendEmailInput() {\n return z\n .object({\n from: z.string().optional(),\n to: z.string(),\n cc: z.string().optional(),\n bcc: z.string().optional(),\n replyTo: z.string().optional(),\n subject: z.string(),\n text: z.string(),\n html: z.string().optional(),\n })\n .catchall(z.unknown());\n }\n\n get emailResponse() {\n return z.object({});\n }\n}\n"],"names":["EmailRouteValidator","sendEmailInput","z","object","from","string","optional","to","cc","bcc","replyTo","subject","text","html","catchall","unknown","emailResponse","strapi","_strapi"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAGO,MAAMA,mBAAAA,CAAAA;AAOX;;;;;AAKC,MACD,IAAIC,cAAAA,GAAiB;QACnB,OAAOC,YAAAA,CACJC,MAAM,CAAC;YACNC,IAAAA,EAAMF,YAAAA,CAAEG,MAAM,EAAA,CAAGC,QAAQ,EAAA;AACzBC,YAAAA,EAAAA,EAAIL,aAAEG,MAAM,EAAA;YACZG,EAAAA,EAAIN,YAAAA,CAAEG,MAAM,EAAA,CAAGC,QAAQ,EAAA;YACvBG,GAAAA,EAAKP,YAAAA,CAAEG,MAAM,EAAA,CAAGC,QAAQ,EAAA;YACxBI,OAAAA,EAASR,YAAAA,CAAEG,MAAM,EAAA,CAAGC,QAAQ,EAAA;AAC5BK,YAAAA,OAAAA,EAAST,aAAEG,MAAM,EAAA;AACjBO,YAAAA,IAAAA,EAAMV,aAAEG,MAAM,EAAA;YACdQ,IAAAA,EAAMX,YAAAA,CAAEG,MAAM,EAAA,CAAGC,QAAQ;SAC3B,CAAA,CACCQ,QAAQ,CAACZ,YAAAA,CAAEa,OAAO,EAAA,CAAA;AACvB,IAAA;AAEA,IAAA,IAAIC,aAAAA,GAAgB;QAClB,OAAOd,YAAAA,CAAEC,MAAM,CAAC,EAAC,CAAA;AACnB,IAAA;AA3BA,IAAA,WAAA,CAAmBc,MAAmB,CAAE;QACtC,IAAI,CAACC,OAAO,GAAGD,MAAAA;AACjB,IAAA;AA0BF;;;;"}
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import * as z from 'zod/v4';
|
|
2
2
|
|
|
3
3
|
class EmailRouteValidator {
|
|
4
|
-
|
|
4
|
+
/**
|
|
5
|
+
* OpenAPI description of the documented `send` fields. Additional keys are provider options
|
|
6
|
+
* (attachments, headers, template data…).
|
|
7
|
+
* The `send` handler does not validate against it: it rejects only a non-object body and
|
|
8
|
+
* passes every field to the provider unchanged.
|
|
9
|
+
*/ get sendEmailInput() {
|
|
5
10
|
return z.object({
|
|
6
11
|
from: z.string().optional(),
|
|
7
12
|
to: z.string(),
|
|
@@ -11,7 +16,7 @@ class EmailRouteValidator {
|
|
|
11
16
|
subject: z.string(),
|
|
12
17
|
text: z.string(),
|
|
13
18
|
html: z.string().optional()
|
|
14
|
-
}).catchall(z.
|
|
19
|
+
}).catchall(z.unknown());
|
|
15
20
|
}
|
|
16
21
|
get emailResponse() {
|
|
17
22
|
return z.object({});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"email.mjs","sources":["../../../../server/src/routes/validation/email.ts"],"sourcesContent":["import type { Core } from '@strapi/types';\nimport * as z from 'zod/v4';\n\nexport class EmailRouteValidator {\n protected readonly _strapi: Core.Strapi;\n\n public constructor(strapi: Core.Strapi) {\n this._strapi = strapi;\n }\n\n get sendEmailInput() {\n return z\n .object({\n from: z.string().optional(),\n to: z.string(),\n cc: z.string().optional(),\n bcc: z.string().optional(),\n replyTo: z.string().optional(),\n subject: z.string(),\n text: z.string(),\n html: z.string().optional(),\n })\n .catchall(z.
|
|
1
|
+
{"version":3,"file":"email.mjs","sources":["../../../../server/src/routes/validation/email.ts"],"sourcesContent":["import type { Core } from '@strapi/types';\nimport * as z from 'zod/v4';\n\nexport class EmailRouteValidator {\n protected readonly _strapi: Core.Strapi;\n\n public constructor(strapi: Core.Strapi) {\n this._strapi = strapi;\n }\n\n /**\n * OpenAPI description of the documented `send` fields. Additional keys are provider options\n * (attachments, headers, template data…).\n * The `send` handler does not validate against it: it rejects only a non-object body and\n * passes every field to the provider unchanged.\n */\n get sendEmailInput() {\n return z\n .object({\n from: z.string().optional(),\n to: z.string(),\n cc: z.string().optional(),\n bcc: z.string().optional(),\n replyTo: z.string().optional(),\n subject: z.string(),\n text: z.string(),\n html: z.string().optional(),\n })\n .catchall(z.unknown());\n }\n\n get emailResponse() {\n return z.object({});\n }\n}\n"],"names":["EmailRouteValidator","sendEmailInput","z","object","from","string","optional","to","cc","bcc","replyTo","subject","text","html","catchall","unknown","emailResponse","strapi","_strapi"],"mappings":";;AAGO,MAAMA,mBAAAA,CAAAA;AAOX;;;;;AAKC,MACD,IAAIC,cAAAA,GAAiB;QACnB,OAAOC,CAAAA,CACJC,MAAM,CAAC;YACNC,IAAAA,EAAMF,CAAAA,CAAEG,MAAM,EAAA,CAAGC,QAAQ,EAAA;AACzBC,YAAAA,EAAAA,EAAIL,EAAEG,MAAM,EAAA;YACZG,EAAAA,EAAIN,CAAAA,CAAEG,MAAM,EAAA,CAAGC,QAAQ,EAAA;YACvBG,GAAAA,EAAKP,CAAAA,CAAEG,MAAM,EAAA,CAAGC,QAAQ,EAAA;YACxBI,OAAAA,EAASR,CAAAA,CAAEG,MAAM,EAAA,CAAGC,QAAQ,EAAA;AAC5BK,YAAAA,OAAAA,EAAST,EAAEG,MAAM,EAAA;AACjBO,YAAAA,IAAAA,EAAMV,EAAEG,MAAM,EAAA;YACdQ,IAAAA,EAAMX,CAAAA,CAAEG,MAAM,EAAA,CAAGC,QAAQ;SAC3B,CAAA,CACCQ,QAAQ,CAACZ,CAAAA,CAAEa,OAAO,EAAA,CAAA;AACvB,IAAA;AAEA,IAAA,IAAIC,aAAAA,GAAgB;QAClB,OAAOd,CAAAA,CAAEC,MAAM,CAAC,EAAC,CAAA;AACnB,IAAA;AA3BA,IAAA,WAAA,CAAmBc,MAAmB,CAAE;QACtC,IAAI,CAACC,OAAO,GAAGD,MAAAA;AACjB,IAAA;AA0BF;;;;"}
|
|
@@ -18,7 +18,11 @@ const send = async (options)=>strapi.plugin('email').provider.send(options);
|
|
|
18
18
|
'text',
|
|
19
19
|
'html'
|
|
20
20
|
];
|
|
21
|
-
const
|
|
21
|
+
const requiredAttributes = [
|
|
22
|
+
'subject',
|
|
23
|
+
'text'
|
|
24
|
+
];
|
|
25
|
+
const missingAttributes = lodash.difference(requiredAttributes, Object.keys(emailTemplate));
|
|
22
26
|
if (missingAttributes.length > 0) {
|
|
23
27
|
throw new Error(`Following attributes are missing from your email template : ${missingAttributes.join(', ')}`);
|
|
24
28
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"email.js","sources":["../../../server/src/services/email.ts"],"sourcesContent":["import { difference, template as lodashTemplate } from 'lodash';\nimport { objects, template } from '@strapi/utils';\n\nimport type {\n EmailConfig,\n EmailOptions,\n EmailTemplate,\n EmailTemplateData,\n SendOptions,\n} from '../types';\n\nconst { createStrictInterpolationRegExp } = template;\n\nconst getProviderSettings = (): EmailConfig => strapi.config.get('plugin::email');\n\nconst send = async (options: SendOptions) => strapi.plugin('email').provider.send(options);\n\n/**\n * fill subject, text and html using lodash template\n * @param {object} emailOptions - to, from and replyto...\n * @param {object} emailTemplate - object containing attributes to fill\n * @param {object} data - data used to fill the template\n * @returns {{ subject, text, subject }}\n */\nconst sendTemplatedEmail = (\n emailOptions: EmailOptions,\n emailTemplate: EmailTemplate,\n data: EmailTemplateData\n) => {\n const attributes = ['subject', 'text', 'html'];\n const missingAttributes = difference(
|
|
1
|
+
{"version":3,"file":"email.js","sources":["../../../server/src/services/email.ts"],"sourcesContent":["import { difference, template as lodashTemplate } from 'lodash';\nimport { objects, template } from '@strapi/utils';\n\nimport type {\n EmailConfig,\n EmailOptions,\n EmailTemplate,\n EmailTemplateData,\n SendOptions,\n} from '../types';\n\nconst { createStrictInterpolationRegExp } = template;\n\nconst getProviderSettings = (): EmailConfig => strapi.config.get('plugin::email');\n\nconst send = async (options: SendOptions) => strapi.plugin('email').provider.send(options);\n\n/**\n * fill subject, text and html using lodash template\n * @param {object} emailOptions - to, from and replyto...\n * @param {object} emailTemplate - object containing attributes to fill\n * @param {object} data - data used to fill the template\n * @returns {{ subject, text, subject }}\n */\nconst sendTemplatedEmail = (\n emailOptions: EmailOptions,\n emailTemplate: EmailTemplate,\n data: EmailTemplateData\n) => {\n const attributes = ['subject', 'text', 'html'];\n const requiredAttributes = ['subject', 'text'];\n const missingAttributes = difference(requiredAttributes, Object.keys(emailTemplate));\n\n if (missingAttributes.length > 0) {\n throw new Error(\n `Following attributes are missing from your email template : ${missingAttributes.join(', ')}`\n );\n }\n\n const allowedInterpolationVariables = objects.keysDeep(data);\n const interpolate = createStrictInterpolationRegExp(allowedInterpolationVariables, 'g');\n\n const templatedAttributes = attributes.reduce(\n (compiled, attribute) =>\n emailTemplate[attribute]\n ? Object.assign(compiled, {\n [attribute]: lodashTemplate(emailTemplate[attribute], {\n interpolate,\n })(data),\n })\n : compiled,\n {}\n );\n\n return strapi.plugin('email').provider.send({ ...emailOptions, ...templatedAttributes });\n};\n\nconst emailService = () => ({\n getProviderSettings,\n send,\n sendTemplatedEmail,\n});\n\nexport default emailService;\n"],"names":["createStrictInterpolationRegExp","template","getProviderSettings","strapi","config","get","send","options","plugin","provider","sendTemplatedEmail","emailOptions","emailTemplate","data","attributes","requiredAttributes","missingAttributes","difference","Object","keys","length","Error","join","allowedInterpolationVariables","objects","keysDeep","interpolate","templatedAttributes","reduce","compiled","attribute","assign","lodashTemplate","emailService"],"mappings":";;;;;AAWA,MAAM,EA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,SAAA,CAAA,GACAgB,UACN,EAAC,CAAA;AAGH,IAAA,OAAO1B,OAAOK,MAAM,CAAC,SAASC,QAAQ,CAACH,IAAI,CAAC;AAAE,QAAA,GAAGK,YAAY;AAAE,QAAA,GAAGgB;AAAoB,KAAA,CAAA;AACxF,CAAA;AAEA,MAAMM,YAAAA,GAAe,KAAO;AAC1B/B,QAAAA,mBAAAA;AACAI,QAAAA,IAAAA;AACAI,QAAAA;KACF;;;;"}
|
|
@@ -16,7 +16,11 @@ const send = async (options)=>strapi.plugin('email').provider.send(options);
|
|
|
16
16
|
'text',
|
|
17
17
|
'html'
|
|
18
18
|
];
|
|
19
|
-
const
|
|
19
|
+
const requiredAttributes = [
|
|
20
|
+
'subject',
|
|
21
|
+
'text'
|
|
22
|
+
];
|
|
23
|
+
const missingAttributes = difference(requiredAttributes, Object.keys(emailTemplate));
|
|
20
24
|
if (missingAttributes.length > 0) {
|
|
21
25
|
throw new Error(`Following attributes are missing from your email template : ${missingAttributes.join(', ')}`);
|
|
22
26
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"email.mjs","sources":["../../../server/src/services/email.ts"],"sourcesContent":["import { difference, template as lodashTemplate } from 'lodash';\nimport { objects, template } from '@strapi/utils';\n\nimport type {\n EmailConfig,\n EmailOptions,\n EmailTemplate,\n EmailTemplateData,\n SendOptions,\n} from '../types';\n\nconst { createStrictInterpolationRegExp } = template;\n\nconst getProviderSettings = (): EmailConfig => strapi.config.get('plugin::email');\n\nconst send = async (options: SendOptions) => strapi.plugin('email').provider.send(options);\n\n/**\n * fill subject, text and html using lodash template\n * @param {object} emailOptions - to, from and replyto...\n * @param {object} emailTemplate - object containing attributes to fill\n * @param {object} data - data used to fill the template\n * @returns {{ subject, text, subject }}\n */\nconst sendTemplatedEmail = (\n emailOptions: EmailOptions,\n emailTemplate: EmailTemplate,\n data: EmailTemplateData\n) => {\n const attributes = ['subject', 'text', 'html'];\n const missingAttributes = difference(
|
|
1
|
+
{"version":3,"file":"email.mjs","sources":["../../../server/src/services/email.ts"],"sourcesContent":["import { difference, template as lodashTemplate } from 'lodash';\nimport { objects, template } from '@strapi/utils';\n\nimport type {\n EmailConfig,\n EmailOptions,\n EmailTemplate,\n EmailTemplateData,\n SendOptions,\n} from '../types';\n\nconst { createStrictInterpolationRegExp } = template;\n\nconst getProviderSettings = (): EmailConfig => strapi.config.get('plugin::email');\n\nconst send = async (options: SendOptions) => strapi.plugin('email').provider.send(options);\n\n/**\n * fill subject, text and html using lodash template\n * @param {object} emailOptions - to, from and replyto...\n * @param {object} emailTemplate - object containing attributes to fill\n * @param {object} data - data used to fill the template\n * @returns {{ subject, text, subject }}\n */\nconst sendTemplatedEmail = (\n emailOptions: EmailOptions,\n emailTemplate: EmailTemplate,\n data: EmailTemplateData\n) => {\n const attributes = ['subject', 'text', 'html'];\n const requiredAttributes = ['subject', 'text'];\n const missingAttributes = difference(requiredAttributes, Object.keys(emailTemplate));\n\n if (missingAttributes.length > 0) {\n throw new Error(\n `Following attributes are missing from your email template : ${missingAttributes.join(', ')}`\n );\n }\n\n const allowedInterpolationVariables = objects.keysDeep(data);\n const interpolate = createStrictInterpolationRegExp(allowedInterpolationVariables, 'g');\n\n const templatedAttributes = attributes.reduce(\n (compiled, attribute) =>\n emailTemplate[attribute]\n ? Object.assign(compiled, {\n [attribute]: lodashTemplate(emailTemplate[attribute], {\n interpolate,\n })(data),\n })\n : compiled,\n {}\n );\n\n return strapi.plugin('email').provider.send({ ...emailOptions, ...templatedAttributes });\n};\n\nconst emailService = () => ({\n getProviderSettings,\n send,\n sendTemplatedEmail,\n});\n\nexport default emailService;\n"],"names":["createStrictInterpolationRegExp","template","getProviderSettings","strapi","config","get","send","options","plugin","provider","sendTemplatedEmail","emailOptions","emailTemplate","data","attributes","requiredAttributes","missingAttributes","difference","Object","keys","length","Error","join","allowedInterpolationVariables","objects","keysDeep","interpolate","templatedAttributes","reduce","compiled","attribute","assign","lodashTemplate","emailService"],"mappings":";;;AAW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AAAA;AACL,SAAA,CAAA,GACAgB,UACN,EAAC,CAAA;AAGH,IAAA,OAAO1B,OAAOK,MAAM,CAAC,SAASC,QAAQ,CAACH,IAAI,CAAC;AAAE,QAAA,GAAGK,YAAY;AAAE,QAAA,GAAGgB;AAAoB,KAAA,CAAA;AACxF,CAAA;AAEA,MAAMM,YAAAA,GAAe,KAAO;AAC1B/B,QAAAA,mBAAAA;AACAI,QAAAA,IAAAA;AACAI,QAAAA;KACF;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"email.d.ts","sourceRoot":"","sources":["../../../../server/src/controllers/email.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,GAAG,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"email.d.ts","sourceRoot":"","sources":["../../../../server/src/controllers/email.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,GAAG,MAAM,KAAK,CAAC;AAS3B;;;;GAIG;AACH,QAAA,MAAM,eAAe;cACH,GAAG,CAAC,OAAO;cA8BX,GAAG,CAAC,OAAO;qBA+BJ,GAAG,CAAC,OAAO;gBA2BhB,GAAG,CAAC,OAAO;CAiB9B,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -3,6 +3,12 @@ import * as z from 'zod/v4';
|
|
|
3
3
|
export declare class EmailRouteValidator {
|
|
4
4
|
protected readonly _strapi: Core.Strapi;
|
|
5
5
|
constructor(strapi: Core.Strapi);
|
|
6
|
+
/**
|
|
7
|
+
* OpenAPI description of the documented `send` fields. Additional keys are provider options
|
|
8
|
+
* (attachments, headers, template data…).
|
|
9
|
+
* The `send` handler does not validate against it: it rejects only a non-object body and
|
|
10
|
+
* passes every field to the provider unchanged.
|
|
11
|
+
*/
|
|
6
12
|
get sendEmailInput(): z.ZodObject<{
|
|
7
13
|
from: z.ZodOptional<z.ZodString>;
|
|
8
14
|
to: z.ZodString;
|
|
@@ -12,7 +18,7 @@ export declare class EmailRouteValidator {
|
|
|
12
18
|
subject: z.ZodString;
|
|
13
19
|
text: z.ZodString;
|
|
14
20
|
html: z.ZodOptional<z.ZodString>;
|
|
15
|
-
}, z.core.$catchall<z.
|
|
21
|
+
}, z.core.$catchall<z.ZodUnknown>>;
|
|
16
22
|
get emailResponse(): z.ZodObject<{}, z.core.$strip>;
|
|
17
23
|
}
|
|
18
24
|
//# sourceMappingURL=email.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"email.d.ts","sourceRoot":"","sources":["../../../../../server/src/routes/validation/email.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,qBAAa,mBAAmB;IAC9B,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC;gBAErB,MAAM,EAAE,IAAI,CAAC,MAAM;IAItC,IAAI,cAAc;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"email.d.ts","sourceRoot":"","sources":["../../../../../server/src/routes/validation/email.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,qBAAa,mBAAmB;IAC9B,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC;gBAErB,MAAM,EAAE,IAAI,CAAC,MAAM;IAItC;;;;;OAKG;IACH,IAAI,cAAc;;;;;;;;;uCAajB;IAED,IAAI,aAAa,mCAEhB;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"email.d.ts","sourceRoot":"","sources":["../../../../server/src/services/email.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,WAAW,EACX,YAAY,EACZ,aAAa,EACb,iBAAiB,EACjB,WAAW,EACZ,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"email.d.ts","sourceRoot":"","sources":["../../../../server/src/services/email.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,WAAW,EACX,YAAY,EACZ,aAAa,EACb,iBAAiB,EACjB,WAAW,EACZ,MAAM,UAAU,CAAC;AAgDlB,QAAA,MAAM,YAAY;+BA5Cc,WAAW;oBAEd,WAAW;uCAUxB,YAAY,iBACX,aAAa,QACtB,iBAAiB;CAkCvB,CAAC;AAEH,eAAe,YAAY,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@strapi/email",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.63.0",
|
|
4
4
|
"description": "Easily configure your Strapi application to send emails.",
|
|
5
5
|
"homepage": "https://strapi.io",
|
|
6
6
|
"bugs": {
|
|
@@ -53,10 +53,8 @@
|
|
|
53
53
|
"build:types:admin": "run -T tsc -p admin/tsconfig.build.json --emitDeclarationOnly",
|
|
54
54
|
"clean": "run -T rimraf ./dist",
|
|
55
55
|
"lint": "run -T eslint . --max-warnings=0",
|
|
56
|
-
"test:front": "run -T
|
|
57
|
-
"test:front:
|
|
58
|
-
"test:front:watch": "run -T cross-env IS_EE=true jest --config ./jest.config.front.js --watchAll",
|
|
59
|
-
"test:front:watch:ce": "run -T cross-env IS_EE=false jest --config ./jest.config.front.js --watchAll",
|
|
56
|
+
"test:front": "run -T jest --config ./jest.config.front.js",
|
|
57
|
+
"test:front:watch": "run -T jest --config ./jest.config.front.js --watchAll",
|
|
60
58
|
"test:ts:back": "run -T tsc -p server/tsconfig.json",
|
|
61
59
|
"test:ts:front": "run -T tsc -p admin/tsconfig.json",
|
|
62
60
|
"watch": "run -T rollup -c -w",
|
|
@@ -64,10 +62,11 @@
|
|
|
64
62
|
"test:unit:vitest:watch": "vitest --watch"
|
|
65
63
|
},
|
|
66
64
|
"dependencies": {
|
|
67
|
-
"@strapi/design-system": "2.
|
|
68
|
-
"@strapi/icons": "2.
|
|
69
|
-
"@strapi/provider-email-sendmail": "5.
|
|
70
|
-
"@strapi/
|
|
65
|
+
"@strapi/design-system": "2.3.1",
|
|
66
|
+
"@strapi/icons": "2.3.1",
|
|
67
|
+
"@strapi/provider-email-sendmail": "5.63.0",
|
|
68
|
+
"@strapi/types": "5.63.0",
|
|
69
|
+
"@strapi/utils": "5.63.0",
|
|
71
70
|
"koa2-ratelimit": "^1.1.3",
|
|
72
71
|
"lodash": "4.18.1",
|
|
73
72
|
"react-intl": "6.6.2",
|
|
@@ -76,8 +75,7 @@
|
|
|
76
75
|
"zod": "4.4.3"
|
|
77
76
|
},
|
|
78
77
|
"devDependencies": {
|
|
79
|
-
"@strapi/admin": "5.
|
|
80
|
-
"@strapi/types": "5.61.1",
|
|
78
|
+
"@strapi/admin": "5.63.0",
|
|
81
79
|
"@testing-library/dom": "10.4.1",
|
|
82
80
|
"@testing-library/jest-dom": "6.9.1",
|
|
83
81
|
"@testing-library/react": "16.3.2",
|
|
@@ -93,16 +91,22 @@
|
|
|
93
91
|
"react-router-dom": "6.30.6",
|
|
94
92
|
"styled-components": "6.4.1",
|
|
95
93
|
"vitest": "catalog:",
|
|
96
|
-
"vitest-config": "5.
|
|
94
|
+
"vitest-config": "5.63.0"
|
|
97
95
|
},
|
|
98
96
|
"peerDependencies": {
|
|
99
97
|
"@strapi/admin": "^5.0.0",
|
|
98
|
+
"@types/koa": "^2.13.5 || ^3",
|
|
100
99
|
"koa": "^2.15.2",
|
|
101
100
|
"react": "^18.0.0",
|
|
102
101
|
"react-dom": "^18.0.0",
|
|
103
102
|
"react-router-dom": "^6.30.3",
|
|
104
103
|
"styled-components": "^6.0.0"
|
|
105
104
|
},
|
|
105
|
+
"peerDependenciesMeta": {
|
|
106
|
+
"@types/koa": {
|
|
107
|
+
"optional": true
|
|
108
|
+
}
|
|
109
|
+
},
|
|
106
110
|
"engines": {
|
|
107
111
|
"node": ">=22.0.0 <=26.x.x",
|
|
108
112
|
"npm": ">=6.0.0"
|