set up mail plugin and environment
This commit is contained in:
@@ -143,6 +143,13 @@ UPLOAD_MAX_FILE_SIZE=52428800
|
|||||||
# Cache-Control max-age (ms) for files served by the local upload provider.
|
# Cache-Control max-age (ms) for files served by the local upload provider.
|
||||||
UPLOAD_LOCAL_MAX_AGE=300000
|
UPLOAD_LOCAL_MAX_AGE=300000
|
||||||
|
|
||||||
|
SMTP_HOST=smtp.example.com
|
||||||
|
SMTP_PORT=587
|
||||||
|
SMTP_USERNAME=your-username
|
||||||
|
SMTP_PASSWORD=your-password
|
||||||
|
DEFAULT_FROM=no-reply@yourdomain.com
|
||||||
|
DEFAULT_REPLY_TO=support@yourdomain.com
|
||||||
|
|
||||||
# Production only - switching the upload provider to S3. Uncomment these after
|
# Production only - switching the upload provider to S3. Uncomment these after
|
||||||
# adding @strapi/provider-upload-aws-s3 and editing the upload block in
|
# adding @strapi/provider-upload-aws-s3 and editing the upload block in
|
||||||
# config/plugins.ts (the switch is documented there step by step).
|
# config/plugins.ts (the switch is documented there step by step).
|
||||||
|
|||||||
@@ -138,6 +138,22 @@ const config = ({ env }: Core.Config.Shared.ConfigParams): Core.Config.Plugin =>
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
email: {
|
||||||
|
config: {
|
||||||
|
provider: "@strapi/provider-email-nodemailer",
|
||||||
|
providerOptions: {
|
||||||
|
host: env("SMTP_HOST", "smtp.office365.com"),
|
||||||
|
port: env("SMTP_PORT", 587),
|
||||||
|
auth: {
|
||||||
|
user: env("SMTP_USERNAME"),
|
||||||
|
pass: env("SMTP_PASSWORD"),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
settings: {
|
||||||
|
defaultFrom: "contact@moonladder.net",
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
export default config;
|
export default config;
|
||||||
|
|||||||
@@ -20,6 +20,7 @@
|
|||||||
"@strapi/database": "5.53.0",
|
"@strapi/database": "5.53.0",
|
||||||
"@strapi/plugin-cloud": "5.53.0",
|
"@strapi/plugin-cloud": "5.53.0",
|
||||||
"@strapi/plugin-users-permissions": "5.53.0",
|
"@strapi/plugin-users-permissions": "5.53.0",
|
||||||
|
"@strapi/provider-email-nodemailer": "^5.54.0",
|
||||||
"@strapi/strapi": "5.53.0",
|
"@strapi/strapi": "5.53.0",
|
||||||
"pg": "^8.23.0",
|
"pg": "^8.23.0",
|
||||||
"react": "^18.0.0",
|
"react": "^18.0.0",
|
||||||
|
|||||||
Generated
+11
@@ -19,6 +19,9 @@ importers:
|
|||||||
'@strapi/plugin-users-permissions':
|
'@strapi/plugin-users-permissions':
|
||||||
specifier: 5.53.0
|
specifier: 5.53.0
|
||||||
version: 5.53.0(62i3dwrrxte2my3iox3m7s6qt4)
|
version: 5.53.0(62i3dwrrxte2my3iox3m7s6qt4)
|
||||||
|
'@strapi/provider-email-nodemailer':
|
||||||
|
specifier: ^5.54.0
|
||||||
|
version: 5.54.0
|
||||||
'@strapi/strapi':
|
'@strapi/strapi':
|
||||||
specifier: 5.53.0
|
specifier: 5.53.0
|
||||||
version: 5.53.0(@babel/runtime@7.29.7)(@codemirror/autocomplete@6.20.3)(@codemirror/language@6.12.4)(@codemirror/lint@6.9.7)(@codemirror/search@6.7.2)(@codemirror/theme-one-dark@6.1.3)(@emotion/is-prop-valid@1.4.0)(@swc/helpers@0.5.23)(@types/hoist-non-react-statics@3.3.7(@types/react@18.3.31))(@types/node@20.19.43)(@types/react-dom@18.3.7(@types/react@18.3.31))(@types/react@18.3.31)(codemirror@5.65.21)(esbuild@0.28.2)(hono@4.13.7)(koa@2.16.4)(lightningcss@1.33.0)(pg@8.23.0)(postcss@8.5.28)(react-dom@18.3.1(react@18.3.1))(react-router-dom@6.30.6(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1)(redux@4.2.1)(styled-components@6.5.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(terser@5.51.2)(ts-toolbelt@9.6.0)(type-fest@0.21.3)
|
version: 5.53.0(@babel/runtime@7.29.7)(@codemirror/autocomplete@6.20.3)(@codemirror/language@6.12.4)(@codemirror/lint@6.9.7)(@codemirror/search@6.7.2)(@codemirror/theme-one-dark@6.1.3)(@emotion/is-prop-valid@1.4.0)(@swc/helpers@0.5.23)(@types/hoist-non-react-statics@3.3.7(@types/react@18.3.31))(@types/node@20.19.43)(@types/react-dom@18.3.7(@types/react@18.3.31))(@types/react@18.3.31)(codemirror@5.65.21)(esbuild@0.28.2)(hono@4.13.7)(koa@2.16.4)(lightningcss@1.33.0)(pg@8.23.0)(postcss@8.5.28)(react-dom@18.3.1(react@18.3.1))(react-router-dom@6.30.6(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1)(redux@4.2.1)(styled-components@6.5.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(terser@5.51.2)(ts-toolbelt@9.6.0)(type-fest@0.21.3)
|
||||||
@@ -2194,6 +2197,10 @@ packages:
|
|||||||
react-router-dom: ^6.30.3
|
react-router-dom: ^6.30.3
|
||||||
styled-components: ^6.0.0
|
styled-components: ^6.0.0
|
||||||
|
|
||||||
|
'@strapi/provider-email-nodemailer@5.54.0':
|
||||||
|
resolution: {integrity: sha512-G1zxBU2f8lGbz/A+lTO2HNZtr5gB2yTle3MV35DuvJdjTvaX0gvef+VcqbfuXrC7e7bqWcPzwkoc2GHpVgt/vw==}
|
||||||
|
engines: {node: '>=20.0.0 <=26.x.x', npm: '>=6.0.0'}
|
||||||
|
|
||||||
'@strapi/provider-email-sendmail@5.53.0':
|
'@strapi/provider-email-sendmail@5.53.0':
|
||||||
resolution: {integrity: sha512-3G1Q/rm7+4uR6/kSOUWfiKdEENiGqYrEdHtDp6KtHMQmdzl730FqWAnhzk8sPF5mhPT7OHBciJtXZNZE4b/iDw==}
|
resolution: {integrity: sha512-3G1Q/rm7+4uR6/kSOUWfiKdEENiGqYrEdHtDp6KtHMQmdzl730FqWAnhzk8sPF5mhPT7OHBciJtXZNZE4b/iDw==}
|
||||||
engines: {node: '>=20.0.0 <=26.x.x', npm: '>=6.0.0'}
|
engines: {node: '>=20.0.0 <=26.x.x', npm: '>=6.0.0'}
|
||||||
@@ -9330,6 +9337,10 @@ snapshots:
|
|||||||
- ts-toolbelt
|
- ts-toolbelt
|
||||||
- typescript
|
- typescript
|
||||||
|
|
||||||
|
'@strapi/provider-email-nodemailer@5.54.0':
|
||||||
|
dependencies:
|
||||||
|
nodemailer: 9.0.1
|
||||||
|
|
||||||
'@strapi/provider-email-sendmail@5.53.0':
|
'@strapi/provider-email-sendmail@5.53.0':
|
||||||
dependencies:
|
dependencies:
|
||||||
nodemailer: 9.0.1
|
nodemailer: 9.0.1
|
||||||
|
|||||||
Reference in New Issue
Block a user