mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-10 23:36:14 -05:00
Merge pull request #1779 from remixz/welcome-email
Add welcome email (GH-1766)
This commit is contained in:
commit
60ad9c2f53
1 changed files with 17 additions and 0 deletions
|
@ -132,6 +132,23 @@ adminControllers = {
|
||||||
password: password
|
password: password
|
||||||
}).then(function (user) {
|
}).then(function (user) {
|
||||||
api.settings.edit('email', email).then(function () {
|
api.settings.edit('email', email).then(function () {
|
||||||
|
var message = {
|
||||||
|
to: email,
|
||||||
|
subject: 'Your New Ghost Blog',
|
||||||
|
html: '<p><strong>Hello!</strong></p>' +
|
||||||
|
'<p>Good news! You\'ve successfully created a brand new Ghost blog over on ' + config().url + '</p>' +
|
||||||
|
'<p>You can log in to your admin account with the following details:</p>' +
|
||||||
|
'<p> Email Address: ' + email + '<br>' +
|
||||||
|
'Password: The password you chose when you signed up</p>' +
|
||||||
|
'<p>Keep this email somewhere safe for future reference, and have fun!</p>' +
|
||||||
|
'<p>xoxo</p>' +
|
||||||
|
'<p>Team Ghost<br>' +
|
||||||
|
'<a href="https://ghost.org">https://ghost.org</a></p>'
|
||||||
|
};
|
||||||
|
mailer.send(message).otherwise(function (error) {
|
||||||
|
errors.logError('Unable to send welcome email. Reason: \n' + error.message);
|
||||||
|
});
|
||||||
|
|
||||||
req.session.regenerate(function (err) {
|
req.session.regenerate(function (err) {
|
||||||
if (!err) {
|
if (!err) {
|
||||||
if (req.session.user === undefined) {
|
if (req.session.user === undefined) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue