Implementing HTML emails

closes #3082
- no more in-line HTML strings
- adding files for "welcome", "reset password", and "invite user" emails
- added mail.generateContent() to create HTML and plain-text email content
- refactored methods that trigger emails to send both HTML and plain-text emails
This commit is contained in:
Maurice Williams 2014-07-22 21:22:13 -04:00
parent 9343bccb1f
commit e30e29bf5d
12 changed files with 858 additions and 67 deletions

View File

@ -46,24 +46,26 @@ authentication = {
return dataProvider.User.generateResetToken(email, expires, dbHash);
}).then(function (resetToken) {
var baseUrl = config.forceAdminSSL ? (config.urlSSL || config.url) : config.url,
siteLink = '<a href="' + baseUrl + '">' + baseUrl + '</a>',
resetUrl = baseUrl.replace(/\/$/, '') + '/ghost/reset/' + resetToken + '/',
resetLink = '<a href="' + resetUrl + '">' + resetUrl + '</a>',
payload = {
emailData = {
resetUrl: resetUrl
};
mail.generateContent({data: emailData, template: 'reset-password'}).then(function (emailContent) {
var payload = {
mail: [{
message: {
to: email,
subject: 'Reset Password',
html: '<p><strong>Hello!</strong></p>' +
'<p>A request has been made to reset the password on the site ' + siteLink + '.</p>' +
'<p>Please follow the link below to reset your password:<br><br>' + resetLink + '</p>' +
'<p>Ghost</p>'
html: emailContent.html,
text: emailContent.text
},
options: {}
}]
};
return mail.send(payload, {context: {internal: true}});
});
return mail.send(payload, {context: {internal: true}});
}).then(function () {
return when.resolve({passwordreset: [{message: 'Check your email for further instructions.'}]});
}).otherwise(function (error) {
@ -212,33 +214,32 @@ authentication = {
setupUser = user.toJSON();
return settings.edit({settings: userSettings}, {context: {user: setupUser.id}});
}).then(function () {
var message = {
to: setupUser.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: ' + setupUser.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>'
},
payload = {
mail: [{
message: message,
options: {}
}]
};
var data = {
ownerEmail: setupUser.email
};
return mail.send(payload, {context: {internal: true}}).otherwise(function (error) {
errors.logError(
error.message,
"Unable to send welcome email, your blog will continue to function.",
"Please see http://docs.ghost.org/mail/ for instructions on configuring email."
);
mail.generateContent({data: data, template: 'welcome'}).then(function (emailContent) {
var message = {
to: setupUser.email,
subject: 'Your New Ghost Blog',
html: emailContent.html,
text: emailContent.text
},
payload = {
mail: [{
message: message,
options: {}
}]
};
return mail.send(payload, {context: {internal: true}}).otherwise(function (error) {
errors.logError(
error.message,
"Unable to send welcome email, your blog will continue to function.",
"Please see http://docs.ghost.org/mail/ for instructions on configuring email."
);
});
});
}).then(function () {
return when.resolve({ users: [setupUser]});
});

View File

@ -1,9 +1,14 @@
// # Mail API
// API for sending Mail
var when = require('when'),
_ = require('lodash'),
config = require('../config'),
canThis = require('../permissions').canThis,
errors = require('../errors'),
path = require('path'),
fs = require('fs'),
templatesDir = path.resolve(__dirname, '..', 'email-templates'),
htmlToText = require('html-to-text'),
mail;
/**
@ -54,24 +59,60 @@ mail = {
* @returns {Promise}
*/
sendTest: function (object, options) {
var html = '<p><strong>Hello there!</strong></p>' +
'<p>Excellent!' +
' You\'ve successfully setup your email config for your Ghost blog over on ' + config.url + '</p>' +
'<p>If you hadn\'t, you wouldn\'t be reading this email, but you are, so it looks like all is well :)</p>' +
'<p>xoxo</p>' +
'<p>Team Ghost<br>' +
'<a href="https://ghost.org">https://ghost.org</a></p>',
payload = {mail: [{
return mail.generateContent({template: 'test'}).then(function (emailContent) {
var payload = {mail: [{
message: {
to: object.to,
subject: 'Test Ghost Email',
html: html
html: emailContent.html,
text: emailContent.text
}
}]};
return mail.send(payload, options);
return mail.send(payload, options);
});
},
/**
*
* @param {
* data: JSON object representing the data that will go into the email
* template: which email template to load (files are stored in /core/server/email-templates/)
* }
* @returns {*}
*/
generateContent: function (options) {
var defaultData = {
siteUrl: config.forceAdminSSL ? (config.urlSSL || config.url) : config.url
},
emailData = _.defaults(defaultData, options.data);
_.templateSettings.interpolate = /{{([\s\S]+?)}}/g;
//read the proper email body template
return when.promise(function (resolve, reject) {
fs.readFile(templatesDir + '/' + options.template + '.html', {encoding: 'utf8'}, function (err, fileContent) {
if (err) {
reject(err);
}
//insert user-specific data into the email
var htmlContent = _.template(fileContent, emailData),
textContent;
//generate a plain-text version of the same email
textContent = htmlToText.fromString(htmlContent);
resolve({ html: htmlContent,
text: textContent
});
});
});
}
};
module.exports = mail;
module.exports = mail;

View File

@ -182,28 +182,40 @@ users = {
dbHash = response.settings[0].value;
return dataProvider.User.generateResetToken(user.email, expires, dbHash);
}).then(function (resetToken) {
var baseUrl = config.forceAdminSSL ? (config.urlSSL || config.url) : config.url,
siteLink = '<a href="' + baseUrl + '">' + baseUrl + '</a>',
resetUrl = baseUrl.replace(/\/$/, '') + '/ghost/signup/' + resetToken + '/',
resetLink = '<a href="' + resetUrl + '">' + resetUrl + '</a>',
payload = {
mail: [{
message: {
to: user.email,
subject: 'Invitation',
html: '<p><strong>Hello!</strong></p>' +
'<p>You have been invited to ' + siteLink + '.</p>' +
'<p>Please follow the link to sign up and publish your ideas:<br><br>' + resetLink + '</p>' +
'<p>Ghost</p>'
},
options: {}
}]
};
return mail.send(payload, {context: {internal: true}}).then(function () {
// If status was invited-pending and sending the invitation succeeded, set status to invited.
if (user.status === 'invited-pending') {
return dataProvider.User.edit({status: 'invited'}, {id: user.id});
}
when.join(users.read({'id': user.created_by}), settings.read({'key': 'title'})).then(function (values) {
var invitedBy = values[0].users[0],
blogTitle = values[1].settings[0].value,
baseUrl = config.forceAdminSSL ? (config.urlSSL || config.url) : config.url,
resetUrl = baseUrl.replace(/\/$/, '') + '/ghost/signup/' + resetToken + '/',
emailData = {
blogName: blogTitle,
invitedByName: invitedBy.name,
invitedByEmail: invitedBy.email,
resetLink: resetUrl
};
mail.generateContent({data: emailData, template: 'invite-user'}).then(function (emailContent) {
var payload = {
mail: [
{
message: {
to: user.email,
subject: emailData.invitedByName + ' has invited you to join ' + emailData.blogName,
html: emailContent.html,
text: emailContent.text
},
options: {}
}
]
};
return mail.send(payload, {context: {internal: true}}).then(function () {
// If status was invited-pending and sending the invitation succeeded, set status to invited.
if (user.status === 'invited-pending') {
return dataProvider.User.edit({status: 'invited'}, {id: user.id});
}
});
});
});
}).then(function () {
return when.resolve({users: [user]});

View File

@ -0,0 +1,56 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN " "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#ffffff" topmargin="0" leftmargin="0" marginheight="0" marginwidth="0" style="-webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; background: #ffffff; color: #828282; font-family: sans-serif; font-size: 15px; line-height: 1.5; margin: 0; width: 100%;">
<table width="100%" cellpadding="0" cellspacing="0" border="0" bgcolor="#ffffff">
<tr>
<td bgcolor="#ffffff" width="100%">
<table class="main-wrapper" width="600" cellpadding="0" cellspacing="0" border="0" align="center" bgcolor="#ffffff">
<tr>
<td class="cell" width="100%">
<div class="wrapper" style="-moz-border-radius: 3px; -webkit-border-radius: 3px; border: #e5e3d8 1px solid; border-radius: 3px; margin: 2%; padding: 5% 8%;">
<table class="content" width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="content-cell" width="100%">
<!-- START OF EMAIL CONTENT -->
<h1 style="color: #212425; font-family: sans-serif; font-size: 28px; font-weight: 600; letter-spacing: -1px; line-height: 1.1; margin: 0.4em 0 0.8em 0; padding: 0;">Welcome</h1>
<p style="color: #828282; font-family: sans-serif; font-size: 15px; font-weight: normal; line-height: 1.5em; margin: 0; padding: 0 0 1.5em 0;"><strong>{{blogName}}</strong> is using Ghost to publish things on the internet! {{invitedByName}} has invited you to join. Please click on the link below to activate your account.</p>
<p style="color: #828282; font-family: sans-serif; font-size: 15px; font-weight: normal; line-height: 1.5em; margin: 0; padding: 0 0 1.5em 0;"><a href="{{resetLink}}" style="color: #5ba4e5;">{{resetLink}}</a></p>
<p style="color: #828282; font-family: sans-serif; font-size: 15px; font-weight: normal; line-height: 1.5em; margin: 0; padding: 0 0 1.5em 0;"><strong>No idea what Ghost is?</strong> It's a simple, beautiful platform for running an online blog or publication. Writers, businesses and individuals from all over the world use Ghost to publish their stories and ideas. <a href="http://ghost.org" style="color: #5ba4e5;">Find out more</a>.</p>
<p style="color: #828282; font-family: sans-serif; font-size: 15px; font-weight: normal; line-height: 1.5em; margin: 0; padding: 0 0 1.5em 0;">If you have trouble activating your {{blogName}} account, you can reach out to {{invitedByName}} on {{invitedByEmail}} for assistance.</p>
<p style="color: #828282; font-family: sans-serif; font-size: 15px; font-weight: normal; line-height: 1.5em; margin: 0; padding: 0 0 1.5em 0;">Have fun, and good luck!</p>
<!-- END OF EMAIL CONTENT -->
</td>
</tr>
</table>
</div>
<div class="container" style="padding: 0 4%;">
<table class="footer" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="footer-cell" align="right" style="color: #888888; font-family: sans-serif; font-size: 11px; line-height: 1.3; padding: 0 0 20px 0;">
Sent by <a href="{{siteUrl}}" style="color: #5ba4e5;">{{siteUrl}}</a>
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>

View File

@ -0,0 +1,127 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style>
.wrapper {
margin: 2%;
padding: 5% 8%;
border: #e5e3d8 1px solid;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
}
.container { padding: 0 4%; }
.content img { max-width: 100%; }
.footer-cell {
padding: 0 0 20px 0;
color: #888888;
font-size: 11px;
line-height: 1.3;
font-family: sans-serif;
}
body {
width:100% !important;
margin: 0;
font-family: sans-serif;
font-size: 15px;
line-height: 1.5;
color:#828282;
background:#ffffff;
-webkit-font-smoothing: antialiased;
-webkit-text-size-adjust:none;
}
h1 {
margin: 0.4em 0 0.8em 0;
padding: 0;
font-weight: 600;
color: #212425;
font-size: 28px;
line-height: 1.1;
font-family: sans-serif;
letter-spacing: -1px;
}
h2 {
margin: 0.6em 0;
padding: 0;
font-weight: 600;
color: #212425;
font-size: 20px;
line-height: 1.2em;
font-family: sans-serif;
letter-spacing: -1px;
}
a { color: #5ba4e5; }
p {
margin: 0;
padding: 0 0 1.5em 0;
color:#828282;
font-size: 15px;
line-height: 1.5em;
font-family: sans-serif;
font-weight:normal;
}
ul, ol {
margin: 0;
padding: 0 0 1.5em 2em;
color:#828282;
font-size: 15px;
line-height: 1.5em;
font-family: sans-serif;
}
@media only screen and (max-width: 620px) {
table[class="main-wrapper"] {width: 100% !important;}
}
</style>
</head>
<body bgcolor="#ffffff" topmargin="0" leftmargin="0" marginheight="0" marginwidth="0">
<table width="100%" cellpadding="0" cellspacing="0" border="0" bgcolor="#ffffff">
<tr>
<td bgcolor="#ffffff" width="100%">
<table class="main-wrapper" width="600" cellpadding="0" cellspacing="0" border="0" align="center" bgcolor="#ffffff">
<tr>
<td class="cell" width="100%">
<div class="wrapper">
<table class="content" width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="content-cell" width="100%">
<!-- START OF EMAIL CONTENT -->
<h1>Welcome</h1>
<p><strong>{{blogName}}</strong> is using Ghost to publish things on the internet! {{invitedByName}} has invited you to join. Please click on the link below to activate your account.</p>
<p><a href="{{resetLink}}">{{resetLink}}</a></p>
<p><strong>No idea what Ghost is?</strong> It's a simple, beautiful platform for running an online blog or publication. Writers, businesses and individuals from all over the world use Ghost to publish their stories and ideas. <a href="http://ghost.org">Find out more</a>.</p>
<p>If you have trouble activating your {{blogName}} account, you can reach out to {{invitedByName}} on {{invitedByEmail}} for assistance.</p>
<p>Have fun, and good luck!</p>
<!-- END OF EMAIL CONTENT -->
</td>
</tr>
</table>
</div>
<div class="container">
<table class="footer" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="footer-cell" align="right">
Sent by <a href="{{siteUrl}}">{{siteUrl}}</a>
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>

View File

@ -0,0 +1,125 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style>
.wrapper {
margin: 2%;
padding: 5% 8%;
border: #e5e3d8 1px solid;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
}
.container { padding: 0 4%; }
.content img { max-width: 100%; }
.footer-cell {
padding: 0 0 20px 0;
color: #888888;
font-size: 11px;
line-height: 1.3;
font-family: sans-serif;
}
body {
width:100% !important;
margin: 0;
font-family: sans-serif;
font-size: 15px;
line-height: 1.5;
color:#828282;
background:#ffffff;
-webkit-font-smoothing: antialiased;
-webkit-text-size-adjust:none;
}
h1 {
margin: 0.4em 0 0.8em 0;
padding: 0;
font-weight: 600;
color: #212425;
font-size: 28px;
line-height: 1.1;
font-family: sans-serif;
letter-spacing: -1px;
}
h2 {
margin: 0.6em 0;
padding: 0;
font-weight: 600;
color: #212425;
font-size: 20px;
line-height: 1.2em;
font-family: sans-serif;
letter-spacing: -1px;
}
a { color: #5ba4e5; }
p {
margin: 0;
padding: 0 0 1.5em 0;
color:#828282;
font-size: 15px;
line-height: 1.5em;
font-family: sans-serif;
font-weight:normal;
}
ul, ol {
margin: 0;
padding: 0 0 1.5em 2em;
color:#828282;
font-size: 15px;
line-height: 1.5em;
font-family: sans-serif;
}
@media only screen and (max-width: 620px) {
table[class="main-wrapper"] {width: 100% !important;}
}
</style>
</head>
<body bgcolor="#ffffff" topmargin="0" leftmargin="0" marginheight="0" marginwidth="0">
<table width="100%" cellpadding="0" cellspacing="0" border="0" bgcolor="#ffffff">
<tr>
<td bgcolor="#ffffff" width="100%">
<table class="main-wrapper" width="600" cellpadding="0" cellspacing="0" border="0" align="center" bgcolor="#ffffff">
<tr>
<td class="cell" width="100%">
<div class="wrapper">
<table class="content" width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="content-cell" width="100%">
<!-- START OF EMAIL CONTENT -->
<p><strong>Hello!</strong></p>
<p>A request has been made to reset the password on the site <a href="{{ siteUrl }}">{{ siteUrl }} </a>.</p>
<p>Please follow the link below to reset your password:<br><br> <a href="{{ resetUrl }}">{{ resetUrl }} </a></p>
<p>Ghost</p>
<!-- END OF EMAIL CONTENT -->
</td>
</tr>
</table>
</div>
<div class="container">
<table class="footer" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="footer-cell" align="right">
Sent by <a href="{{siteUrl}}">{{siteUrl}}</a>
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>

View File

@ -0,0 +1,128 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style>
.wrapper {
margin: 2%;
padding: 5% 8%;
border: #e5e3d8 1px solid;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
}
.container { padding: 0 4%; }
.content img { max-width: 100%; }
.footer-cell {
padding: 0 0 20px 0;
color: #888888;
font-size: 11px;
line-height: 1.3;
font-family: sans-serif;
}
body {
width:100% !important;
margin: 0;
font-family: sans-serif;
font-size: 15px;
line-height: 1.5;
color:#828282;
background:#ffffff;
-webkit-font-smoothing: antialiased;
-webkit-text-size-adjust:none;
}
h1 {
margin: 0.4em 0 0.8em 0;
padding: 0;
font-weight: 600;
color: #212425;
font-size: 28px;
line-height: 1.1;
font-family: sans-serif;
letter-spacing: -1px;
}
h2 {
margin: 0.6em 0;
padding: 0;
font-weight: 600;
color: #212425;
font-size: 20px;
line-height: 1.2em;
font-family: sans-serif;
letter-spacing: -1px;
}
a { color: #5ba4e5; }
p {
margin: 0;
padding: 0 0 1.5em 0;
color:#828282;
font-size: 15px;
line-height: 1.5em;
font-family: sans-serif;
font-weight:normal;
}
ul, ol {
margin: 0;
padding: 0 0 1.5em 2em;
color:#828282;
font-size: 15px;
line-height: 1.5em;
font-family: sans-serif;
}
@media only screen and (max-width: 620px) {
table[class="main-wrapper"] {width: 100% !important;}
}
</style>
</head>
<body bgcolor="#ffffff" topmargin="0" leftmargin="0" marginheight="0" marginwidth="0">
<table width="100%" cellpadding="0" cellspacing="0" border="0" bgcolor="#ffffff">
<tr>
<td bgcolor="#ffffff" width="100%">
<table class="main-wrapper" width="600" cellpadding="0" cellspacing="0" border="0" align="center" bgcolor="#ffffff">
<tr>
<td class="cell" width="100%">
<div class="wrapper">
<table class="content" width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="content-cell" width="100%">
<!-- START OF EMAIL CONTENT -->
<p><strong>Hello there!</strong></p>
<p>Excellent!
You've successfully setup your email config for your Ghost blog over on {{ siteUrl }}</p>
<p>If you hadn't, you wouldn't be reading this email, but you are, so it looks like all is well :)</p>
<p>xoxo</p>
<p>Team Ghost<br>
<a href="https://ghost.org">https://ghost.org</a></p>
<!-- END OF EMAIL CONTENT -->
</td>
</tr>
</table>
</div>
<div class="container">
<table class="footer" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="footer-cell" align="right">
Sent by <a href="{{siteUrl}}">{{siteUrl}}</a>
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>

View File

@ -0,0 +1,130 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style>
.wrapper {
margin: 2%;
padding: 5% 8%;
border: #e5e3d8 1px solid;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
}
.container { padding: 0 4%; }
.content img { max-width: 100%; }
.footer-cell {
padding: 0 0 20px 0;
color: #888888;
font-size: 11px;
line-height: 1.3;
font-family: sans-serif;
}
body {
width:100% !important;
margin: 0;
font-family: sans-serif;
font-size: 15px;
line-height: 1.5;
color:#828282;
background:#ffffff;
-webkit-font-smoothing: antialiased;
-webkit-text-size-adjust:none;
}
h1 {
margin: 0.4em 0 0.8em 0;
padding: 0;
font-weight: 600;
color: #212425;
font-size: 28px;
line-height: 1.1;
font-family: sans-serif;
letter-spacing: -1px;
}
h2 {
margin: 0.6em 0;
padding: 0;
font-weight: 600;
color: #212425;
font-size: 20px;
line-height: 1.2em;
font-family: sans-serif;
letter-spacing: -1px;
}
a { color: #5ba4e5; }
p {
margin: 0;
padding: 0 0 1.5em 0;
color:#828282;
font-size: 15px;
line-height: 1.5em;
font-family: sans-serif;
font-weight:normal;
}
ul, ol {
margin: 0;
padding: 0 0 1.5em 2em;
color:#828282;
font-size: 15px;
line-height: 1.5em;
font-family: sans-serif;
}
@media only screen and (max-width: 620px) {
table[class="main-wrapper"] {width: 100% !important;}
}
</style>
</head>
<body bgcolor="#ffffff" topmargin="0" leftmargin="0" marginheight="0" marginwidth="0">
<table width="100%" cellpadding="0" cellspacing="0" border="0" bgcolor="#ffffff">
<tr>
<td bgcolor="#ffffff" width="100%">
<table class="main-wrapper" width="600" cellpadding="0" cellspacing="0" border="0" align="center" bgcolor="#ffffff">
<tr>
<td class="cell" width="100%">
<div class="wrapper">
<table class="content" width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="content-cell" width="100%">
<!-- START OF EMAIL CONTENT -->
<p><strong>Hello!</strong></p>
<p>Good news! You've successfully created a brand new Ghost blog over on {{ siteUrl }} </p>
<p>You can log in to your admin account with the following details:</p>
<p> Email Address: {{ownerEmail}} <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>
<!-- END OF EMAIL CONTENT -->
</td>
</tr>
</table>
</div>
<div class="container">
<table class="footer" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="footer-cell" align="right">
Sent by <a href="{{siteUrl}}">{{siteUrl}}</a>
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>

View File

@ -0,0 +1,54 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN " "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#ffffff" topmargin="0" leftmargin="0" marginheight="0" marginwidth="0" style="-webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; background: #ffffff; color: #828282; font-family: sans-serif; font-size: 15px; line-height: 1.5; margin: 0; width: 100%;">
<table width="100%" cellpadding="0" cellspacing="0" border="0" bgcolor="#ffffff">
<tr>
<td bgcolor="#ffffff" width="100%">
<table class="main-wrapper" width="600" cellpadding="0" cellspacing="0" border="0" align="center" bgcolor="#ffffff">
<tr>
<td class="cell" width="100%">
<div class="wrapper" style="-moz-border-radius: 3px; -webkit-border-radius: 3px; border: #e5e3d8 1px solid; border-radius: 3px; margin: 2%; padding: 5% 8%;">
<table class="content" width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="content-cell" width="100%">
<!-- START OF EMAIL CONTENT -->
<p style="color: #828282; font-family: sans-serif; font-size: 15px; font-weight: normal; line-height: 1.5em; margin: 0; padding: 0 0 1.5em 0;"><strong>Hello!</strong></p>
<p style="color: #828282; font-family: sans-serif; font-size: 15px; font-weight: normal; line-height: 1.5em; margin: 0; padding: 0 0 1.5em 0;">A request has been made to reset the password on the site <a href="{{ siteUrl }}" style="color: #5ba4e5;">{{ siteUrl }} </a>.</p>
<p style="color: #828282; font-family: sans-serif; font-size: 15px; font-weight: normal; line-height: 1.5em; margin: 0; padding: 0 0 1.5em 0;">Please follow the link below to reset your password:<br><br> <a href="{{ resetUrl }}" style="color: #5ba4e5;">{{ resetUrl }} </a></p>
<p style="color: #828282; font-family: sans-serif; font-size: 15px; font-weight: normal; line-height: 1.5em; margin: 0; padding: 0 0 1.5em 0;">Ghost</p>
<!-- END OF EMAIL CONTENT -->
</td>
</tr>
</table>
</div>
<div class="container" style="padding: 0 4%;">
<table class="footer" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="footer-cell" align="right" style="color: #888888; font-family: sans-serif; font-size: 11px; line-height: 1.3; padding: 0 0 20px 0;">
Sent by <a href="{{siteUrl}}" style="color: #5ba4e5;">{{siteUrl}}</a>
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>

View File

@ -0,0 +1,57 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN " "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#ffffff" topmargin="0" leftmargin="0" marginheight="0" marginwidth="0" style="-webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; background: #ffffff; color: #828282; font-family: sans-serif; font-size: 15px; line-height: 1.5; margin: 0; width: 100%;">
<table width="100%" cellpadding="0" cellspacing="0" border="0" bgcolor="#ffffff">
<tr>
<td bgcolor="#ffffff" width="100%">
<table class="main-wrapper" width="600" cellpadding="0" cellspacing="0" border="0" align="center" bgcolor="#ffffff">
<tr>
<td class="cell" width="100%">
<div class="wrapper" style="-moz-border-radius: 3px; -webkit-border-radius: 3px; border: #e5e3d8 1px solid; border-radius: 3px; margin: 2%; padding: 5% 8%;">
<table class="content" width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="content-cell" width="100%">
<!-- START OF EMAIL CONTENT -->
<p style="color: #828282; font-family: sans-serif; font-size: 15px; font-weight: normal; line-height: 1.5em; margin: 0; padding: 0 0 1.5em 0;"><strong>Hello there!</strong></p>
<p style="color: #828282; font-family: sans-serif; font-size: 15px; font-weight: normal; line-height: 1.5em; margin: 0; padding: 0 0 1.5em 0;">Excellent!
You've successfully setup your email config for your Ghost blog over on {{ siteUrl }}</p>
<p style="color: #828282; font-family: sans-serif; font-size: 15px; font-weight: normal; line-height: 1.5em; margin: 0; padding: 0 0 1.5em 0;">If you hadn't, you wouldn't be reading this email, but you are, so it looks like all is well :)</p>
<p style="color: #828282; font-family: sans-serif; font-size: 15px; font-weight: normal; line-height: 1.5em; margin: 0; padding: 0 0 1.5em 0;">xoxo</p>
<p style="color: #828282; font-family: sans-serif; font-size: 15px; font-weight: normal; line-height: 1.5em; margin: 0; padding: 0 0 1.5em 0;">Team Ghost<br>
<a href="https://ghost.org" style="color: #5ba4e5;">https://ghost.org</a></p>
<!-- END OF EMAIL CONTENT -->
</td>
</tr>
</table>
</div>
<div class="container" style="padding: 0 4%;">
<table class="footer" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="footer-cell" align="right" style="color: #888888; font-family: sans-serif; font-size: 11px; line-height: 1.3; padding: 0 0 20px 0;">
Sent by <a href="{{siteUrl}}" style="color: #5ba4e5;">{{siteUrl}}</a>
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>

View File

@ -0,0 +1,59 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN " "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#ffffff" topmargin="0" leftmargin="0" marginheight="0" marginwidth="0" style="-webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; background: #ffffff; color: #828282; font-family: sans-serif; font-size: 15px; line-height: 1.5; margin: 0; width: 100%;">
<table width="100%" cellpadding="0" cellspacing="0" border="0" bgcolor="#ffffff">
<tr>
<td bgcolor="#ffffff" width="100%">
<table class="main-wrapper" width="600" cellpadding="0" cellspacing="0" border="0" align="center" bgcolor="#ffffff">
<tr>
<td class="cell" width="100%">
<div class="wrapper" style="-moz-border-radius: 3px; -webkit-border-radius: 3px; border: #e5e3d8 1px solid; border-radius: 3px; margin: 2%; padding: 5% 8%;">
<table class="content" width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="content-cell" width="100%">
<!-- START OF EMAIL CONTENT -->
<p style="color: #828282; font-family: sans-serif; font-size: 15px; font-weight: normal; line-height: 1.5em; margin: 0; padding: 0 0 1.5em 0;"><strong>Hello!</strong></p>
<p style="color: #828282; font-family: sans-serif; font-size: 15px; font-weight: normal; line-height: 1.5em; margin: 0; padding: 0 0 1.5em 0;">Good news! You've successfully created a brand new Ghost blog over on {{ siteUrl }} </p>
<p style="color: #828282; font-family: sans-serif; font-size: 15px; font-weight: normal; line-height: 1.5em; margin: 0; padding: 0 0 1.5em 0;">You can log in to your admin account with the following details:</p>
<p style="color: #828282; font-family: sans-serif; font-size: 15px; font-weight: normal; line-height: 1.5em; margin: 0; padding: 0 0 1.5em 0;"> Email Address: {{ownerEmail}} <br>
Password: The password you chose when you signed up</p>
<p style="color: #828282; font-family: sans-serif; font-size: 15px; font-weight: normal; line-height: 1.5em; margin: 0; padding: 0 0 1.5em 0;">Keep this email somewhere safe for future reference, and have fun!</p>
<p style="color: #828282; font-family: sans-serif; font-size: 15px; font-weight: normal; line-height: 1.5em; margin: 0; padding: 0 0 1.5em 0;">xoxo</p>
<p style="color: #828282; font-family: sans-serif; font-size: 15px; font-weight: normal; line-height: 1.5em; margin: 0; padding: 0 0 1.5em 0;">Team Ghost<br>
<a href="https://ghost.org" style="color: #5ba4e5;">https://ghost.org</a></p>
<!-- END OF EMAIL CONTENT -->
</td>
</tr>
</table>
</div>
<div class="container" style="padding: 0 4%;">
<table class="footer" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="footer-cell" align="right" style="color: #888888; font-family: sans-serif; font-size: 11px; line-height: 1.3; padding: 0 0 20px 0;">
Sent by <a href="{{siteUrl}}" style="color: #5ba4e5;">{{siteUrl}}</a>
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>

View File

@ -37,14 +37,15 @@
"busboy": "0.2.3",
"colors": "0.6.2",
"compression": "^1.0.2",
"cookie-parser": "1.0.1",
"connect": "3.0.0-rc.1",
"connect-slashes": "1.2.0",
"cookie-parser": "1.0.1",
"downsize": "0.0.5",
"express": "4.1.1",
"express-hbs": "0.7.10",
"express-session": "1.0.4",
"fs-extra": "0.8.1",
"html-to-text": "^0.1.0",
"knex": "0.6.21",
"lodash": "2.4.1",
"moment": "2.4.0",