As you can read in the documentation, Accounts.sendVerificationEmail
is only available on the server, and you're trying to use it on the client.
I'm not sure that you can use the Accounts.onCreateUser
function to send verification emails: in this function, the user has not been added to the Meteor.users
collection yet, and I guess Accounts.sendVerificationEmail
requires the user to be in that collection. I don't know the best way to solve this, but you can always use a cursor selecting all users, and then observe users added to the collection (although, this is not a good solution).
It's not enough to use the sendVerificationEmail
field in the Accounts.config function?