Blame view

imports/server/emails/verifyEmail.js 761 Bytes
ff976df49   Deepak   added orgs public...
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   Deepak   added specific or...
10
      return '[YoungDesk] Verify Your Email Address';
ff976df49   Deepak   added orgs public...
11
12
    },
    text(user, url) {
217abccee   Deepak   added a way to ru...
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   Deepak   added orgs public...
20
21
22
23
      const theUrl = Meteor.absoluteUrl(`back/verifyEmail/${_.last(url.split('/'))}`);
  
      return (
  `
217abccee   Deepak   added a way to ru...
24
  Hello, ${name}!
ff976df49   Deepak   added orgs public...
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.
  
  `
      );
    },
  };