This commit is contained in:
2021-06-30 22:27:07 +02:00
parent b2bed61e82
commit fdc36ff64f
81 changed files with 16 additions and 21 deletions

13
app/Mailers/FormConfirmation.ts Normal file → Executable file
View File

@@ -1,6 +1,4 @@
import mjml from 'mjml'
import { BaseMailer, MessageContract } from '@ioc:Adonis/Addons/Mail'
import View from "@ioc:Adonis/Core/View";
export default class FormConfirmation extends BaseMailer {
@@ -8,16 +6,19 @@ export default class FormConfirmation extends BaseMailer {
super()
}
public html = mjml(View.render('emails/confirmation_form', {
/*public html = mjml(View.render('emails/confirmation_form', {
name: this.name
})).html
})).html*/
public prepare(message: MessageContract) {
message
.from('no-reply@arthurdanjou.fr')
.replyTo('contact@arthurdanjou.fr')
.to(this.email)
.subject('Confirmation Form')
.html(this.html)
.subject('Thank you for contacting !')
.htmlView('emails/confirmation_form', {
name: this.name,
url: 'https://arthurdanjou.fr'
})
}
}