37 lines
780 B
PHP
37 lines
780 B
PHP
<?php
|
|
|
|
namespace App\Mail;
|
|
|
|
use App\Backup;
|
|
use Illuminate\Bus\Queueable;
|
|
use Illuminate\Mail\Mailable;
|
|
use Illuminate\Queue\SerializesModels;
|
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
|
|
|
class BackupWarning extends Mailable
|
|
{
|
|
use Queueable, SerializesModels;
|
|
|
|
/**
|
|
* Create a new message instance.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function __construct(Backup $backup)
|
|
{
|
|
$this->backup = $backup;
|
|
}
|
|
|
|
/**
|
|
* Build the message.
|
|
*
|
|
* @return $this
|
|
*/
|
|
public function build()
|
|
{
|
|
return $this->from('reports@mydentalbackup.co.uk')
|
|
->subject('WARNING Your backup ( ' . $this->backup->schedule_name . ' ) has warnings')
|
|
->markdown('mail.backup.warning', ['backup' => $this->backup]);
|
|
}
|
|
}
|