mirror of
https://framagit.org/les/gancio.git
synced 2025-01-31 16:42:22 +01:00
use html2text sending email
This commit is contained in:
parent
a7a745e04f
commit
e1046b49fc
7 changed files with 2 additions and 38 deletions
|
@ -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')
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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 })}
|
Loading…
Reference in a new issue