diff --git a/public/language/en-GB/email.json b/public/language/en-GB/email.json
index 8351cfcd10..378dd84b38 100644
--- a/public/language/en-GB/email.json
+++ b/public/language/en-GB/email.json
@@ -7,6 +7,9 @@
"greeting_no_name": "Hello",
"greeting_with_name": "Hello %1",
+ "email.verify-your-email.subject": "Please verify your email",
+ "email.verify.text1": "Your email address has changed!",
+
"welcome.text1": "Thank you for registering with %1!",
"welcome.text2": "To fully activate your account, we need to verify that you own the email address you registered with.",
"welcome.text3": "An administrator has accepted your registration application. You can login with your username/password now.",
diff --git a/src/user/email.js b/src/user/email.js
index 598536ad29..24559104a3 100644
--- a/src/user/email.js
+++ b/src/user/email.js
@@ -100,14 +100,16 @@ UserEmail.sendValidationEmail = function (uid, options, callback) {
},
function (username, next) {
var title = meta.config.title || meta.config.browserTitle || 'NodeBB';
- translator.translate('[[email:welcome-to, ' + title + ']]', meta.config.defaultLang, function (subject) {
+ var subject = options.subject || '[[email:welcome-to, ' + title + ']]';
+ var template = options.template || 'welcome';
+ translator.translate(subject, meta.config.defaultLang, function (subject) {
var data = {
username: username,
confirm_link: confirm_link,
confirm_code: confirm_code,
subject: subject,
- template: 'welcome',
+ template: template,
uid: uid,
};
@@ -115,7 +117,7 @@ UserEmail.sendValidationEmail = function (uid, options, callback) {
plugins.fireHook('action:user.verify', { uid: uid, data: data });
next();
} else {
- emailer.send('welcome', uid, data, next);
+ emailer.send(template, uid, data, next);
}
});
},
diff --git a/src/user/profile.js b/src/user/profile.js
index 5da6eb7409..2849fbde1a 100644
--- a/src/user/profile.js
+++ b/src/user/profile.js
@@ -223,6 +223,8 @@ module.exports = function (User) {
if (parseInt(meta.config.requireEmailConfirmation, 10) === 1 && newEmail) {
User.email.sendValidationEmail(uid, {
email: newEmail,
+ subject: '[[email:email.verify-your-email.subject]]',
+ template: 'verify_email',
});
}
User.setUserField(uid, 'email:confirmed', 0, next);
diff --git a/src/views/emails/verify_email.tpl b/src/views/emails/verify_email.tpl
new file mode 100644
index 0000000000..1a061786cb
--- /dev/null
+++ b/src/views/emails/verify_email.tpl
@@ -0,0 +1,53 @@
+
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+ [[email:verify.text1]]
+ [[email:welcome.text2]]
+ |
+
+
+
+
+
+
+ |
+
+
+
+ [[email:closing]]
+ {site_title}
+ |
+
+
+ |
+
+
+
+
+
+
+