You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think I know why, after checked the ./lib/email.js in Keystone.
need to use keystone.get('email locals') to grab the data
It would be good to hard code in the keystone/lib/email.js since keystone-email dropped the default locals.
temperary solution:
User.schema.methods.resetPassword=function(callback){varuser=this;user.resetPasswordKey=keystone.utils.randomString([16,24]);/** Get the emailLcals */constemailLocals=keystone.get('email locals')console.log(emailLocals)user.save(function(err){if(err)returncallback(err);newkeystone.Email('forgotten-password').send({/** insert to the option object */
...emailLocals,user: user,link: '/reset-password/'+user.resetPasswordKey,subject: 'Reset your SydJS Password',to: user.email,from: {name: 'SydJS',email: '[email protected]'}},callback);});}
I found this code snippet in the
keystone.js
it seems did not pass anything into the email template, is the 'email locals' is valid key for keystone.set('')?
(below is the screenshot from the receiving email)
the host url is missing in email.
Thank you in advance
The text was updated successfully, but these errors were encountered: