Reputation: 7147
How should I connect to a local smtp server using Strapi? I need it to send reset password email to user email. I've managed to do it with sendgrid, by installing providers
npm install strapi-provider-email-sendgrid@alpha --save
however, I'm not sure how to do it with our own smtp server.
For example I have this SMTP server details, however I don't know where should I plugin these values to:
1) SMTP server address: 10.10.10.9
2) port: 25
3) Username: username
4) Password: password
Accoding to nodemailer link, I can set it here. However, I still don't know where to set it in strapi
let smtpConfig = {
host: 'smtp.example.com', // 10.10.10.9
port: 587, // 25
secure: false, // upgrade later with STARTTLS
auth: {
user: 'username', // username
pass: 'password' // password
}
};
How can I duplicate the sendgrid provider and modify it?
There's only "Sendmail Default From" and "Sendmail Default Reply-To" fields in the email setting page:
Upvotes: 3
Views: 8229
Reputation: 4118
For you need you are not using the correct Strapi email provider.
Please check strapi-email-nodemailer
you will have all options you need.
npm i strapi-email-nodemailer --save
there is no tag alpha
for this provider.
Upvotes: 5