I have been using Meteor for two weeks, I am trying to add functionality to send an email once the user account has been created. I have looked at several tutorials on the Accounts.onCreateUser() function. Here is the code below.
if(Meteor.isClient{
....some code here.....
Accounts.createUser({
..... Insert some options ......
}, function(error){
..... some More code here ......
});
}
if(Meteor.isServer){
Accounts.onCreate(function(options, user){
...... Do the required .......
});
}
It seems like it is according to the several tutorials that I have been using.
I have tested out the code and but the onCreate for the account is always returning 'Internal server error' and I can't find out a cause for it. Is this the way that I am supposed the Accounts.onCreate() callback for the form?
Also is there a debugging functionality if so I can further track the code down?
Thanks