diff --git a/src/mail_templates/box_update_available.ejs b/src/mail_templates/box_update_available.ejs
index 77975cc7b..59b7187a1 100644
--- a/src/mail_templates/box_update_available.ejs
+++ b/src/mail_templates/box_update_available.ejs
@@ -16,5 +16,35 @@ your Cloudron
<% } else { %>
+
+
+
+
+Dear Admin,
+
+
+ Version <%= newBoxVersion %> of Cloudron <%= fqdn %> is now available!
+
+
+
+ Your Cloudron will update automatically tonight. Alternately, update immediately at <%= webadminUrl %>.
+
+
+Changelog:
+
+<% for (var i = 0; i < changelog.length; i++) { %>
+ - <%- changelog[i] %>
+<% } %>
+
+
+
+
+
+
+
+
+
<% } %>
diff --git a/src/mailer.js b/src/mailer.js
index db12fe3e2..c7000bb17 100644
--- a/src/mailer.js
+++ b/src/mailer.js
@@ -393,11 +393,26 @@ function boxUpdateAvailable(newBoxVersion, changelog) {
getAdminEmails(function (error, adminEmails) {
if (error) return console.log('Error getting admins', error);
+ var templateData = {
+ fqdn: config.fqdn(),
+ webadminUrl: config.adminOrigin(),
+ newBoxVersion: newBoxVersion,
+ changelog: changelog,
+ cloudronAvatarUrl: config.adminOrigin() + '/api/v1/cloudron/avatar'
+ };
+
+ var templateDataText = JSON.parse(JSON.stringify(templateData));
+ templateDataText.format = 'text';
+
+ var templateDataHTML = JSON.parse(JSON.stringify(templateData));
+ templateDataHTML.format = 'html';
+
var mailOptions = {
from: mailConfig().from,
to: adminEmails.join(', '),
subject: util.format('%s has a new update available', config.fqdn()),
- text: render('box_update_available.ejs', { fqdn: config.fqdn(), webadminUrl: config.adminOrigin(), newBoxVersion: newBoxVersion, changelog: changelog, format: 'text' })
+ text: render('box_update_available.ejs', templateDataText),
+ html: render('box_update_available.ejs', templateDataHTML)
};
enqueue(mailOptions);