Hi, I try to use Nodemailer in strapi4, but I don’t find any doc or tuto that work… It was working fine in strapi3 for me… Anyone used it with success ?
I’m using it successfully in version 4.1.3.
I was struggling to make it work following the offical package readme.
The problem was that I was using only this file as described on the readme.
config/env/development/plugins.js
module.exports = ({ env }) => ({
email: {
provider: 'nodemailer',
providerOptions: {
host: 'localhost',
port: 1025,
ignoreTLS: true,
},
},
});
But if using it alone, without the main config/plugins.js, you must nest a config object on it.
module.exports = ({ env }) => ({
email: {
config: {
provider: "nodemailer",
providerOptions: {
host: "localhost",
port: 1025,
ignoreTLS: true,
},
settings: {
defaultFrom: "DEFAULT EMAIL",
defaultReplyTo: "DEFAULT MAIL",
},
},
},
});