- Add support for email verification.
- Clean up formatting of accounts email templates.
This commit is contained in:
parent
54d7acb2a6
commit
75b470907b
6 changed files with 112 additions and 10 deletions
|
|
@ -9,6 +9,18 @@ const emailTemplates = Accounts.emailTemplates;
|
|||
emailTemplates.siteName = name;
|
||||
emailTemplates.from = from;
|
||||
|
||||
emailTemplates.verifyEmail = {
|
||||
subject() {
|
||||
return `[${name}] Verify Your Email Address`;
|
||||
},
|
||||
text(user, url) {
|
||||
const userEmail = user.emails[0].address;
|
||||
const urlWithoutHash = url.replace('#/', '');
|
||||
if (Meteor.isDevelopment) console.info(`Verify Email Link: ${urlWithoutHash}`); // eslint-disable-line
|
||||
return `Hey, ${user.profile.name.first}! Welcome to ${name}.\n\nTo verify your email address (${userEmail}), click the link below:\n\n${urlWithoutHash}\n\nIf you feel something is wrong, please contact our support team: ${email}.`;
|
||||
},
|
||||
};
|
||||
|
||||
emailTemplates.resetPassword = {
|
||||
subject() {
|
||||
return `[${name}] Reset Your Password`;
|
||||
|
|
@ -16,13 +28,7 @@ emailTemplates.resetPassword = {
|
|||
text(user, url) {
|
||||
const userEmail = user.emails[0].address;
|
||||
const urlWithoutHash = url.replace('#/', '');
|
||||
|
||||
if (Meteor.isDevelopment) console.info(`Reset Password Link: ${urlWithoutHash}`);
|
||||
|
||||
return `A password reset has been requested for the account related to this
|
||||
address (${userEmail}). To reset the password, visit the following link:
|
||||
\n\n${urlWithoutHash}\n\n If you did not request this reset, please ignore
|
||||
this email. If you feel something is wrong, please contact our support team:
|
||||
${email}.`;
|
||||
if (Meteor.isDevelopment) console.info(`Reset Password Link: ${urlWithoutHash}`); // eslint-disable-line
|
||||
return `A password reset has been requested for the account related to this address (${userEmail}).\n\nTo reset the password, visit the following link: \n\n${urlWithoutHash}\n\n If you did not request this reset, please ignore this email. If you feel something is wrong, please contact our support team: ${email}.`;
|
||||
},
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue