如何通过回送为Mandril模板占位符提供值

从环回中如何为心轴模板的占位符提供值

lys_521 回答:如何通过回送为Mandril模板占位符提供值

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
                            }]
                        }
                    },
本文链接:https://www.f2er.com/3126790.html

大家都在问