Email Template Variables / lodash

System Information
  • Strapi Version: 3.4.5
  • Operating System: Linux
  • Database: Mongo
  • Node Version: 8.10.0
  • NPM Version: 3.5.2
  • Yarn Version:

Hiya, I’m trying to add a lodash variable to the email confirmation template.

This is the URL I’m looking to send through this email.

frontend.com/<%= USER.MAIL %>/<%= CODE %>

USER.MAIL is the same of “to” so it shouldn’t be difficult, but I can’t find it.

Thanks in advance.

What I want to do, would also work in here if I could return the user email.

image

frontend.com/reset-password/<%= user.email %>

To explain a bit more, the frontend will handle the request and send it to Strapi in order to have a compulsory step for the user to update the password straight after the confirmation. My solution is partially working, but Strapi doesn’t return the user email.

  confirmEmail(token){
    return axios.get(`${STRAPI_URL}/auth/email-confirmation?confirmation=${token}`)
  }

Thanks.

Any help here? Please.

The object is USER (uppercase) and key is email (with lowercase)

So the correct syntax is:
http://frontend.com/<%= USER.email %>/<%= CODE %>

It works! Thanks mate :smiley:

1 Like