System Information
- Strapi Version:
- Operating System:
- Database:
- Node Version:
- NPM Version:
- Yarn Version:
I’m using nodemailer as the email provider, and when using the env function, it returns undefined. For example:
module.exports = ({ env }) => ({
email: {
provider: env('EMAIL-PROVIDER'),
providerOptions: {
host: env('EMAIL-HOST'),
port: env('EMAIL-PORT'),
auth: {
user: env('EMAIL-USER'),
pass: env('EMAIL-PASS'),
},
},
settings: {
defaultFrom: env('EMAIL-USER'),
defaultReplyTo: env('EMAIL-USER'),
},
}
});
It turns out that all those environment variables return undefined, therefore the provider does not work, I must clarify that I have a .env.email file in /config/.env.email
, and in that same location I have the file plugins.js
where I export the previous module. How use .env files in strapi ?. Any example?