You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docusaurus/docs/cms/features/email.md
+34Lines changed: 34 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,6 +31,13 @@ The Email feature enables Strapi applications to send emails from a server or an
31
31
32
32
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.
33
33
34
+
:::info Provider vs. Host
35
+
- 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.
36
+
- 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.
37
+
38
+
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.
39
+
:::
40
+
34
41
### Admin panel settings
35
42
36
43
**Path to configure the feature:** <Iconname="gear-six" /> Settings > Email feature > Configuration
@@ -196,6 +203,33 @@ When configuring your provider you might want to change the configuration based
196
203
197
204
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.
198
205
206
+
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:
207
+
208
+
```js title="/config/plugins.js"
209
+
module.exports= ({ env }) => ({
210
+
email: {
211
+
config: {
212
+
provider:'nodemailer',
213
+
providerOptions: {
214
+
host:env('SMTP_HOST'),
215
+
port:env.int('SMTP_PORT', 587),
216
+
secure:false, // Use `true` for port 465
217
+
auth: {
218
+
user:env('SMTP_USERNAME'),
219
+
pass:env('SMTP_PASSWORD'),
220
+
},
221
+
},
222
+
settings: {
223
+
defaultFrom:'no-reply@example.com',
224
+
defaultReplyTo:'support@example.com',
225
+
},
226
+
},
227
+
},
228
+
});
229
+
```
230
+
231
+
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.
232
+
199
233
##### Creating providers
200
234
201
235
To implement your own custom provider you must <ExternalLinkto="https://docs.npmjs.com/creating-node-js-modules"text="create a Node.js module"/>.
0 commit comments