"Forbidden" error for send "forgot_password" email while strapi owns the rights

System Information
  • Strapi Version: 4.5.5
  • Operating System: Windows11
  • Database:
  • Node Version: 16.16.0
  • NPM Version: 9.2.0
  • Yarn Version: 1.22.19

Hello everyone,

I’m a new with Strapi and i am working with it for a small professional project.
I have folowed this tutorial (Strapi Authentication with Nuxt.js), the login page work properly, seem for the almost all other features but “forget-password” don’t work and i don’t know why. (but i think the probleme is “sending email”).

I have “Internal server error” code in web side and insomnia(or Postman) side.

Back prompt side:

I don’t know why i’m “Forbidden” to send mail, because i allowed this featured in Strapi.
All rôles are allowed to send email.
And email was activated in Strapi.

And i have already send mail manualy with this part of code:

async afterCreate(event) {        // User
        const { result } = event;
        try{
            await strapi.plugins['email'].services.email.send({
                to: result.email,
                from: 'no-reply@example.com',
                subject: 'Mail de confirmation',
                text: `FirstName : ${result.firstName}`
            })
        } catch(err) {
            console.log(err);
        }
    },

Someone have some clues for me?

Hi, Seqa, did you set “Email templates” → “Reset password” ?

If you didn’t set “Shipper email”, it won’t work probably.

2 Likes

This is the solution! Thank you so much. Was not clear what the issue was and without your post we would never have known.