Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Strapi: how to send confirmation email when user signup?

Tags:

strapi

I want to send emails to signup user and activate it until cerntain actions are done.

I don't know whether this feature is available already, or I need to implement the logic myself. With the default authentication and user models, it looks like quite complicated to modify the logics. how difficult is it to implement such features?

like image 969
chuan Avatar asked Jan 18 '17 23:01

chuan


1 Answers

As you said, there is already a default logic for the Users in Strapi. However, the files can be edited and you can custom the behavior.

In your case, you need to go to ./api/user/controllers/User.js file in the create method and add your custom logic for sending an email where the User has been created (see https://github.com/strapi/strapi-generate-users/blob/master/files/api/user/controllers/User.js#L52).

I hope this answer will help you!

PS: I'm one of the authors of Strapi.

like image 141
Aurélien Georget Avatar answered Sep 28 '22 01:09

Aurélien Georget