2020-07-22 05:03:33 +02:00
|
|
|
<?php
|
2021-06-09 17:00:35 +02:00
|
|
|
|
2020-07-22 05:03:33 +02:00
|
|
|
/**
|
2020-09-06 11:38:10 +02:00
|
|
|
* Invoice Ninja (https://invoiceninja.com).
|
2020-07-22 05:03:33 +02:00
|
|
|
*
|
|
|
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
|
|
|
*
|
2024-04-12 06:15:41 +02:00
|
|
|
* @copyright Copyright (c) 2024. Invoice Ninja LLC (https://invoiceninja.com)
|
2020-07-22 05:03:33 +02:00
|
|
|
*
|
2021-06-16 08:58:16 +02:00
|
|
|
* @license https://www.elastic.co/licensing/elastic-license
|
2020-07-22 05:03:33 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
namespace App\Mail\User;
|
|
|
|
|
|
|
|
use Illuminate\Mail\Mailable;
|
|
|
|
|
|
|
|
class UserNotificationMailer extends Mailable
|
|
|
|
{
|
|
|
|
public $mail_obj;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Create a new message instance.
|
|
|
|
*
|
2020-10-28 11:10:49 +01:00
|
|
|
* @param $mail_obj
|
2020-07-22 05:03:33 +02:00
|
|
|
*/
|
|
|
|
public function __construct($mail_obj)
|
|
|
|
{
|
|
|
|
$this->mail_obj = $mail_obj;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Build the message.
|
|
|
|
*
|
|
|
|
* @return $this
|
|
|
|
*/
|
|
|
|
public function build()
|
|
|
|
{
|
2020-12-02 04:08:35 +01:00
|
|
|
return $this->from(config('mail.from.address'), config('mail.from.name'))
|
2021-06-09 17:00:35 +02:00
|
|
|
->subject($this->mail_obj->subject)
|
2022-06-21 11:57:17 +02:00
|
|
|
->text('email.admin.generic_text', [
|
2022-03-04 04:01:09 +01:00
|
|
|
'title' => $this->mail_obj->data['title'],
|
|
|
|
'body' => $this->mail_obj->data['message'],
|
|
|
|
])
|
2023-02-19 23:21:21 +01:00
|
|
|
->view($this->mail_obj->markdown, $this->mail_obj->data);
|
2020-07-22 05:03:33 +02:00
|
|
|
}
|
|
|
|
}
|