Как зацикливаться, чтобы обеспечить значения для заполнителя шаблона оправки - PullRequest
0 голосов
/ 11 ноября 2019

Из обратной петли Как предоставить значения для заполнителя для шаблона оправки

1 Ответ

0 голосов
/ 11 ноября 2019
In this case we have use something like this in mandril template
<p>You may log in to application with this temporary password: <span mc:edit="newPassword"></span> </p> 

In loopback code i.e  in remote hook in my case i have defined in routes.js as
User.on('resetPasswordRequest', function (info) {
//my info object has the password set
User.app.models.Email.send({
                        to: info.email,
                        from: 'abc',
                        subject: 'application Password Reset',
                        template: {
                            name: "mandril template as defined in mandril",
                            content: [{
                                name: "newPassword", //name is placeholder name
                                content: info.options.password //  i have already set my password in info object being passed to this remote hook
                            }]
                        }
                    },
...