mirror of
https://github.com/vale981/Vulcan
synced 2025-03-06 10:01:40 -05:00
email an invite to the new user
This commit is contained in:
parent
407e57c35f
commit
3734564364
1 changed files with 18 additions and 0 deletions
|
@ -62,6 +62,24 @@ Meteor.methods({
|
|||
userDoingAction: currentUser,
|
||||
sendEmail: true
|
||||
});
|
||||
} else {
|
||||
|
||||
var communityName = getSetting('title','Telescope'),
|
||||
subject = 'You are invited to try ' + communityName,
|
||||
emailHtml = Handlebars.templates['email_invite']({
|
||||
subject: subject,
|
||||
invitedBy: getDisplayName(Meteor.user()),
|
||||
communityName: communityName,
|
||||
singupLink: getSignupUrl()
|
||||
});
|
||||
|
||||
sendNotification({
|
||||
to : userEmail,
|
||||
subject : subject,
|
||||
text : stripHTML(emailHtml),
|
||||
html : emailHtml
|
||||
});
|
||||
|
||||
}
|
||||
} else {
|
||||
throw new Meteor.Error(701, "You can't invite this user, sorry.");
|
||||
|
|
Loading…
Add table
Reference in a new issue