From 83f51ed08a0244b0d0467eaaeba1d7f9f1c594ff Mon Sep 17 00:00:00 2001 From: remixz Date: Sat, 28 Dec 2013 13:42:52 -0800 Subject: [PATCH] Add welcome email for new sign ups Closes #1766 - Once signed up, a quick welcome email is sent - Links to their blog url, and gives the email they used to sign up --- core/server/controllers/admin.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/core/server/controllers/admin.js b/core/server/controllers/admin.js index fa760f713b..c4cf34887b 100644 --- a/core/server/controllers/admin.js +++ b/core/server/controllers/admin.js @@ -132,6 +132,23 @@ adminControllers = { password: password }).then(function (user) { api.settings.edit('email', email).then(function () { + var message = { + to: email, + subject: 'Your New Ghost Blog', + html: '

Hello!

' + + '

Good news! You\'ve successfully created a brand new Ghost blog over on ' + config().url + '

' + + '

You can log in to your admin account with the following details:

' + + '

Email Address: ' + email + '
' + + 'Password: The password you chose when you signed up

' + + '

Keep this email somewhere safe for future reference, and have fun!

' + + '

xoxo

' + + '

Team Ghost
' + + 'https://ghost.org

' + }; + mailer.send(message).otherwise(function (error) { + errors.logError('Unable to send welcome email. Reason: \n' + error.message); + }); + req.session.regenerate(function (err) { if (!err) { if (req.session.user === undefined) {