Enable Mail while generate invoice
This commit is contained in:
parent
f1e8d90af1
commit
ffe159720b
|
@ -123,11 +123,11 @@ class InvoiceController extends Controller
|
|||
|
||||
DB::commit();
|
||||
$recipients = [preg_replace("/\s+/", "", $hyper->email)]; // Supprimer les espaces dans le mail
|
||||
// Mail::mailer('smtp')->raw($message, function ($message) use ($recipients, $title, $file) {
|
||||
// $message->subject($title)
|
||||
// ->to($recipients)
|
||||
// ->attachData($file->output(), str_replace(' ', '-', $title) . '.pdf');
|
||||
// });
|
||||
Mail::mailer('smtp')->raw($message, function ($message) use ($recipients, $title, $file) {
|
||||
$message->subject($title)
|
||||
->to($recipients)
|
||||
->attachData($file->output(), str_replace(' ', '-', $title) . '.pdf');
|
||||
});
|
||||
|
||||
} catch (\Throwable $t) {
|
||||
DB::rollBack();
|
||||
|
|
Loading…
Reference in New Issue