Do not stop registration if mail fails

pull/4416/head
Marcelo Schmidt 10 years ago
parent fa9dbf99f1
commit 3a56e10ee6
No known key found for this signature in database
GPG Key ID: CA48C21A7B66097E
  1. 7
      server/methods/registerUser.coffee

@ -21,7 +21,10 @@ Meteor.methods
RocketChat.saveCustomFields(userId, formData)
if userData.email
Accounts.sendVerificationEmail(userId, userData.email);
try
if userData.email
Accounts.sendVerificationEmail(userId, userData.email);
catch error
# throw new Meteor.Error 'error-email-send-failed', 'Error trying to send email: ' + error.message, { method: 'registerUser', message: error.message }
return userId

Loading…
Cancel
Save