I have nodemailer plugin installed and configured. Everything runs smoothly on localhost but when I deploy the application into Digital Ocean the configuration can’t read ENV variables and only serves defaults.
“scripts”: {
“build”: “strapi build”,
“db:stop”: “docker-compose stop”,
“db:up”: “docker-compose up -d”,
“develop”: “strapi develop”,
“start”: “strapi start”,
“strapi”: “strapi”
},
“dependencies”: {
“@strapi/plugin-i18n”: “4.15.5”,
“@strapi/plugin-users-permissions”: “4.15.5”,
“@strapi/provider-email-nodemailer”: “4.15.5”,
“@strapi/strapi”: “4.15.5”,
“luxon”: “3.4.4”,
“mysql”: “2.18.1”,
“react”: “18.2.0”,
“react-dom”: “18.2.0”,
“react-router-dom”: “6.21.0”,
“styled-components”: “6.1.1”,
“zod”: “3.22.4”
},
“devDependencies”: {
“@types/luxon”: “3.3.7”
},
“engines”: {
“node”: “>=18.0.0 <=20.x.x”,
“npm”: “>=6.0.0”
},
export default ({ env }) => ({
email: {
config: {
provider: “nodemailer”,
providerOptions: {
host: env(“SMTP_HOST”),
port: env(“SMTP_PORT”, 1234),
secure: false,
auth: {
user: env(“SMTP_USER”),
pass: env(“SMTP_PASSWORD”),
},
tls: {
ciphers: “SSLv3”,
},
},
settings: {
defaultFrom: env(“SMTP_FROM”),
defaultReplyTo: env(“SMTP_FROM”),
},
},
},
});
This topic has been created from a Discord post (1214486998627389490) to give it more visibility.
It will be on Read-Only mode here.
Join the conversation on Discord