I tried the following:
module.exports = ({ env }) => ({
// …
email: {
provider: env(‘EMAIL_PROVIDER’),
providerOptions: {
host: env(‘EMAIL_SMTP_HOST’),
port: env(‘EMAIL_SMTP_PORT’),
auth: {
user: env(‘EMAIL_SMTP_USER’),
pass: env(‘EMAIL_SMTP_PASS’),
},
},
settings: {
defaultFrom: env(‘EMAIL_ADDRESS_FROM’),
defaultReplyTo: env(‘EMAIL_ADDRESS_REPLY’),
testAddress: ‘test@strapi.io’,
},
},
// …
})
I set all the variables in the .env file, the provider is nodemailer, which gives me the following error,
When running the following:
curl --location --request POST ‘localhost:1337/email/’
–header ‘Content-Type: application/json’
–data-raw ‘{“email”: “fifapik104@carsik.com”}’
{“data”:null,“error”:{“status”:401,“name”:“UnauthorizedError”,“message”:“Missing or invalid credentials”,“details”:{}}}
I get this:
{“data”:null,“error”:{“status”:401,“name”:“UnauthorizedError”,“message”:“Missing or invalid credentials”,“details”:{}}}%
I appreciate your inputs