Blame view
imports/server/emails/verifyEmail.js
761 Bytes
ff976df49
|
1 2 3 4 5 6 7 8 9 |
import _ from 'lodash'; import { Accounts } from 'meteor/accounts-base'; Accounts.config({ sendVerificationEmail: true }); Accounts.emailTemplates.verifyEmail = { subject() { |
b7054c9b2
|
10 |
return '[YoungDesk] Verify Your Email Address'; |
ff976df49
|
11 12 |
}, text(user, url) { |
217abccee
|
13 14 15 16 17 18 19 |
console.log(user); if(user.firstName){ const name = user.firstName; }else{ const name = user.profile.firstName; } const name = user.firstName; |
ff976df49
|
20 21 22 23 |
const theUrl = Meteor.absoluteUrl(`back/verifyEmail/${_.last(url.split('/'))}`); return ( ` |
217abccee
|
24 |
Hello, ${name}! |
ff976df49
|
25 26 27 28 29 30 31 32 33 34 35 36 |
To verify your email address, visit the following link: ${theUrl} If you did not request this verification, please ignore this email. ` ); }, }; |