use html2text sending email

This commit is contained in:
les
2020-02-10 12:00:49 +01:00
parent a7a745e04f
commit e1046b49fc
7 changed files with 2 additions and 38 deletions

View File

@@ -21,7 +21,7 @@ const mail = {
debug(`Send ${template} email to ${addresses}`)
const email = new Email({
views: { root: path.join(__dirname, '..', 'emails') },
htmlToText: false,
htmlToText: true,
juice: true,
juiceResources: {
preserveImportant: true,
@@ -53,7 +53,7 @@ const mail = {
locals: {
...locales,
locale,
config: { title: config.title, baseurl: config.baseurl, description: config.description },
config: { title: config.title, baseurl: config.baseurl, description: config.description, admin_email: config.admin_email },
datetime: datetime => moment.unix(datetime).format('ddd, D MMMM HH:mm')
}
}