From 2b42d72df5e6ed14365a49b484131f27327d01e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A9gane=20Lacheny?= Date: Thu, 6 Nov 2025 11:14:17 +0100 Subject: [PATCH 1/2] Add info callout + config example in Email feature page --- docusaurus/docs/cms/features/email.md | 34 +++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/docusaurus/docs/cms/features/email.md b/docusaurus/docs/cms/features/email.md index 11b57b2fee..d3e7a9f5bc 100644 --- a/docusaurus/docs/cms/features/email.md +++ b/docusaurus/docs/cms/features/email.md @@ -31,6 +31,13 @@ The Email feature enables Strapi applications to send emails from a server or an Most configuration options for the Email feature are handled via your Strapi project's code. The Email feature is not configurable in the admin panel, however users can test email delivery if it has been setup by an administrator. +:::info Provider VS Host +- The email provider refers to the package that Strapi calls to send an email (e.g. official providers such as Sendgrid or community packages such as `@strapi/provider-email-nodemailer`). Providers implement the logic for sending mail when Strapi invokes them. +- The provider host (or server) refers to the connection details (e.g. an SMTP hostname, port, or REST API endpoint) that the provider exposes. Some providers hide these details behind an API key, while others require you to supply host-related options in your configuration. + +The Email feature only handles outbound delivery. Receiving or parsing incoming messages is outside the scope of the built-in plugin and must be implemented with your email provider's inbound webhooks or a custom integration. +::: + ### Admin panel settings **Path to configure the feature:** Settings > Email feature > Configuration @@ -196,6 +203,33 @@ When configuring your provider you might want to change the configuration based You can set a specific configuration in the `/config/env/{env}/plugins.js|ts` configuration file and it will be used to overwrite the default configuration. +Some providers expose SMTP-style connection details instead of (or in addition to) an API key. Add those values in `providerOptions` so Strapi can reach the provider host. For instance, the community Nodemailer provider expects the host, port, and authentication credentials: + +```js title="/config/plugins.js" +module.exports = ({ env }) => ({ + email: { + config: { + provider: 'nodemailer', + providerOptions: { + host: env('SMTP_HOST'), + port: env.int('SMTP_PORT', 587), + secure: false, // Use `true` for port 465 + auth: { + user: env('SMTP_USERNAME'), + pass: env('SMTP_PASSWORD'), + }, + }, + settings: { + defaultFrom: 'no-reply@example.com', + defaultReplyTo: 'support@example.com', + }, + }, + }, +}); +``` + +If your provider gives you a single URL instead of host and port values, pass that URL (for example `https://api.eu.mailgun.net`) in `providerOptions` using the key the package expects. + ##### Creating providers To implement your own custom provider you must . From 216e612cf567ca5a00bcf48d5a2959f4c096351a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A9gane=20Lacheny?= Date: Fri, 7 Nov 2025 16:16:52 +0100 Subject: [PATCH 2/2] Improve after feedback --- docusaurus/docs/cms/features/email.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docusaurus/docs/cms/features/email.md b/docusaurus/docs/cms/features/email.md index d3e7a9f5bc..1dc26c1856 100644 --- a/docusaurus/docs/cms/features/email.md +++ b/docusaurus/docs/cms/features/email.md @@ -31,7 +31,7 @@ The Email feature enables Strapi applications to send emails from a server or an Most configuration options for the Email feature are handled via your Strapi project's code. The Email feature is not configurable in the admin panel, however users can test email delivery if it has been setup by an administrator. -:::info Provider VS Host +:::info Provider vs. Host - The email provider refers to the package that Strapi calls to send an email (e.g. official providers such as Sendgrid or community packages such as `@strapi/provider-email-nodemailer`). Providers implement the logic for sending mail when Strapi invokes them. - The provider host (or server) refers to the connection details (e.g. an SMTP hostname, port, or REST API endpoint) that the provider exposes. Some providers hide these details behind an API key, while others require you to supply host-related options in your configuration.