ldc-legaulois/app/Mail/ContactComplainMail.php

25 lines
719 B
PHP
Raw Permalink Normal View History

2024-10-04 17:24:15 +02:00
<?php
namespace App\Mail;
class ContactComplainMail extends ContactMail
{
/**
* Build the message.
*
* @return $this
*/
public function build()
{
return $this->view('emails.contact-passerelle')
2024-10-04 17:24:15 +02:00
->subject(sprintf('Nouveau message consommateur Le Gaulois (%s)', $this->data->type->label()))
->text('emails.contact-passerelle-plain')
2024-10-04 17:24:15 +02:00
->with('data', $this->data)
->attachData(
view('emails.passerelle-xml', ['data' => $this->data->exportToPasserelleDataArray()])->render(),
2026-09-25 16:25:31 +02:00
sprintf('LEGAULOIS_PASS_MESSAGE_%d.xml', date('YmdHis')),
2024-10-04 17:24:15 +02:00
['mime' => 'application/xml']
);
}
}