Skip to content

Node.js based forum software built for the modern web

fix: restored email logo to all outgoing emails

Julian Lam6c1f9c3c46bd
diff --git a/src/emailer.js b/src/emailer.js
index 672d8605c9..b74e132153 100644
--- a/src/emailer.js
+++ b/src/emailer.js
@@ -142,7 +142,7 @@ Emailer.registerApp = function (expressApp) {
app = expressApp;
var logo = null;
- if (meta.configs.hasOwnProperty('brand:emailLogo')) {
+ if (meta.config.hasOwnProperty('brand:emailLogo')) {
logo = (!meta.config['brand:emailLogo'].startsWith('http') ? nconf.get('url') : '') + meta.config['brand:emailLogo'];
}
diff --git a/src/meta/configs.js b/src/meta/configs.js
index 549fd17be2..cd945a7887 100644
--- a/src/meta/configs.js
+++ b/src/meta/configs.js
@@ -163,6 +163,7 @@ function processConfig(data, callback) {
return next(err);
}
+ data['brand:emailLogo'] = nconf.get('url') + path.join(nconf.get('upload_url'), 'system', 'site-logo-x50.png');
data['brand:emailLogo:height'] = size.height;
data['brand:emailLogo:width'] = size.width;
next();
diff --git a/src/views/emails/partials/header.tpl b/src/views/emails/partials/header.tpl
index e094968647..9dfdba28cf 100644
--- a/src/views/emails/partials/header.tpl
+++ b/src/views/emails/partials/header.tpl
@@ -173,7 +173,7 @@
<tr>
<td style="padding: 20px 0; text-align: center">
<!-- IF logo.src -->
- <img src="{logo.src}" height="{logo.height}" width="{logo.width}" alt="{site_title}" border="0" style="height: {logo.height}px; width: {logo.width}px; background: #222222; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 15px; line-height: 20px; color: #555555;">
+ <img src="{logo.src}" height="{logo.height}" width="{logo.width}" alt="{site_title}" border="0" style="height: {logo.height}px; width: {logo.width}px; background: #f6f6f6; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 15px; line-height: 20px; color: #333333;">
<!-- ELSE -->
&nbsp;
<!-- ENDIF logo.src -->