use html2text sending email
This commit is contained in:
@@ -21,7 +21,7 @@ const mail = {
|
|||||||
debug(`Send ${template} email to ${addresses}`)
|
debug(`Send ${template} email to ${addresses}`)
|
||||||
const email = new Email({
|
const email = new Email({
|
||||||
views: { root: path.join(__dirname, '..', 'emails') },
|
views: { root: path.join(__dirname, '..', 'emails') },
|
||||||
htmlToText: false,
|
htmlToText: true,
|
||||||
juice: true,
|
juice: true,
|
||||||
juiceResources: {
|
juiceResources: {
|
||||||
preserveImportant: true,
|
preserveImportant: true,
|
||||||
@@ -53,7 +53,7 @@ const mail = {
|
|||||||
locals: {
|
locals: {
|
||||||
...locales,
|
...locales,
|
||||||
locale,
|
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')
|
datetime: datetime => moment.unix(datetime).format('ddd, D MMMM HH:mm')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
p= t('admin_register.content', { user, config })
|
|
||||||
|
|
||||||
hr
|
|
||||||
small #{config.title} / #{config.description}
|
|
||||||
br
|
|
||||||
small <a href="#{config.baseurl}">#{config.baseurl}</a>
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
p !{t('confirm.content', { config })}
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
extends ../layout.pug
|
|
||||||
block content
|
|
||||||
h3 #{event.title}
|
|
||||||
p Dove: #{event.place.name} - #{event.place.address}
|
|
||||||
p Quando: #{datetime(event.start_datetime)}
|
|
||||||
br
|
|
||||||
if event.image_path
|
|
||||||
<center>
|
|
||||||
<img style="height: 89vh; margin: 0 auto;" src="#{config.baseurl}/media/#{event.image_path}" />
|
|
||||||
</center>
|
|
||||||
p #{event.description}
|
|
||||||
|
|
||||||
each tag in event.tags
|
|
||||||
span ##{tag.tag}
|
|
||||||
br
|
|
||||||
<a href="#{config.baseurl}/event/#{event.id}">#{config.baseurl}/event/#{event.id}</a>
|
|
||||||
hr
|
|
||||||
if to_confirm
|
|
||||||
p Puoi confermare questo evento <a href="#{config.baseurl}/admin/confirm/#{event.id}">qui</a>
|
|
||||||
else
|
|
||||||
p Puoi eliminare queste notifiche <a href="#{config.baseurl}/del_notification/#{notification.remove_code}">qui</a>
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
p= !t('recover.content', {config, user})
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
p= t('register.content', { config, user })
|
|
||||||
|
|
||||||
hr
|
|
||||||
small #{config.title} / #{config.description}
|
|
||||||
br
|
|
||||||
small <a href="#{config.baseurl}">#{config.baseurl}</a>
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
p !{t('user_confirm.content', { config, user })}
|
|
||||||
Reference in New Issue
Block a user