Blame view

imports/startup/server/accounts/email-templates.js 807 Bytes
7df77f0fa   tmcdeveloper   finish wiring up ...
1
2
3
4
  const name           = 'Application Name',
        email          = '<support@application.com>',
        from           = `${ name } ${ email }`,
        emailTemplates = Accounts.emailTemplates;
c39994410   Ryan Glover   wip converting to...
5

7df77f0fa   tmcdeveloper   finish wiring up ...
6
7
  emailTemplates.siteName = name;
  emailTemplates.from     = from;
c39994410   Ryan Glover   wip converting to...
8
9
10
  
  emailTemplates.resetPassword = {
    subject() {
7df77f0fa   tmcdeveloper   finish wiring up ...
11
      return `[${ name }] Reset Your Password`;
c39994410   Ryan Glover   wip converting to...
12
13
    },
    text( user, url ) {
7df77f0fa   tmcdeveloper   finish wiring up ...
14
      let userEmail      = user.emails[ 0 ].address,
5cb01249d   Ryan Glover   clean up and addi...
15
          urlWithoutHash = url.replace( '#/', '' );
c39994410   Ryan Glover   wip converting to...
16

7df77f0fa   tmcdeveloper   finish wiring up ...
17
18
19
20
21
      return `A password reset has been requested for the account related to this address (${ userEmail }). To reset the password, visit the following link:
  
  ${ urlWithoutHash }
  
   If you did not request this reset, please ignore this email. If you feel something is wrong, please contact our support team: ${ email }.`;
c39994410   Ryan Glover   wip converting to...
22
23
    }
  };