Fix more sendwithus things

This commit is contained in:
phoenixeliot 2016-06-06 16:48:21 -07:00
parent 08bc32e005
commit 9d4215d99d
2 changed files with 3 additions and 0 deletions
server

View file

@ -458,8 +458,10 @@ UserHandler = class UserHandler extends Handler
# Type-specific email data
if type is 'subscribe modal parent'
emailParams['email_id'] = sendwithus.templates.parent_subscribe_email.id
emailParams['version_name'] = sendwithus.templates.parent_subscribe_email.version
else if type is 'share progress modal parent'
emailParams['email_id'] = sendwithus.templates.share_progress_email.id
emailParams['version_name'] = sendwithus.templates.share_progress_email.version
sendMail emailParams

View file

@ -273,6 +273,7 @@ UserSchema.methods.register = (done) ->
timestamp = (new Date).getTime()
data =
email_id: if @isStudent() then welcome_email_student.id else welcome_email_user.id
version_name: if @isStudent() then welcome_email_student.version else welcome_email_user.version
recipient:
address: @get('email')
name: @broadName()