Meteor accounts-ui forgotpassword from not defined

851 views Asked by At

I am meteor with

accounts-password 
and accounts-ui

I have setup my Accounts.templates so that I can receive active e-mails, but when I am using accounts-ui forgto password i got 'from undefined' I am not so sure that Accounts.templates .from attribute is the one I need to work with

I20150617-14:36:42.009(-7)? Exception while invoking method     
forgotPassword' TypeError: Cannot read property 'from' of undefined
I20150617-14:36:42.009(-7)?at Object.Accounts.sendResetPasswordEmail (packages/accounts-password/password_server.js:406:1)
I20150617-14:36:42.009(-7)?     at [object Object].Meteor.methods.forgotPassword (packages/accounts-password/password_server.js:365:1)
I20150617-14:36:42.009(-7)?     at maybeAuditArgumentChecks (packages/ddp/livedata_server.js:1617:1)
I20150617-14:36:42.009(-7)?     at packages/ddp/livedata_server.js:648:1
I20150617-14:36:42.009(-7)?     at [object Object]._.extend.withValue (packages/meteor/dynamics_nodejs.js:56:1)
I20150617-14:36:42.009(-7)?     at packages/ddp/livedata_server.js:647:1
I20150617-14:36:42.009(-7)?     at [object Object]._.extend.withValue (packages/meteor/dynamics_nodejs.js:56:1)
I20150617-14:36:42.009(-7)?     at [object Object]._.extend.protocol_handlers.method (packages/ddp/livedata_server.js:646:1)
I20150617-14:36:42.009(-7)?     at packages/ddp/livedata_server.js:546:1

can some one help me solve this? Sorry for the mess format I am new with formatting thanks a lot

Accounts.emailTemplates = {
  from: " Meteor Accounts <[email protected]>",
  verifyEmail: {
    subject: function(user) {
      return "Please verify and active your email";
    },
    text: function(user, url) {
      //console.log(user.profile);
      var username = "\nYour username is: " + user.username;
      var password = "\nYour default password is:" + "123456" + "(Please change           it asap while you login)";
      var greeting = (user.profile && user.profile.empName.firstName) ?
        ("Hello " + user.profile.empName.firstName + ":") : ("Hello," + "\n");

      greeting = greeting + username + "\n" + password + "\n" + "\n" + "To verify your account email, simply click the link below.\n" + "\n" + url + "\n" + "\n" + "Thanks.\n";

      return greeting;
    }
  }
}
0

There are 0 answers