Make email setup changes
This commit is contained in:
parent
f7d3d225e4
commit
9d9589f9a0
|
|
@ -80,17 +80,17 @@ class BackupController extends Controller
|
||||||
*/
|
*/
|
||||||
if($backup->status == "Success")
|
if($backup->status == "Success")
|
||||||
{
|
{
|
||||||
Mail::to($client->email)
|
Mail::to('reports@mydentalbackup.co.uk')
|
||||||
->send(new BackupSuccess($backup, $client));
|
->send(new BackupSuccess($backup, $client));
|
||||||
}
|
}
|
||||||
elseif($backup->status == "Warning")
|
elseif($backup->status == "Warning")
|
||||||
{
|
{
|
||||||
Mail::to($client->email)
|
Mail::to('reports@mydentalbackup.co.uk')
|
||||||
->send(new BackupWarning($backup, $client));
|
->send(new BackupWarning($backup, $client));
|
||||||
}
|
}
|
||||||
elseif($backup->status == "Error")
|
elseif($backup->status == "Error")
|
||||||
{
|
{
|
||||||
Mail::to($client->email)
|
Mail::to('reports@mydentalbackup.co.uk')
|
||||||
->send(new BackupError($backup, $client));
|
->send(new BackupError($backup, $client));
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ class BackupError extends Mailable
|
||||||
public function build()
|
public function build()
|
||||||
{
|
{
|
||||||
return $this->from('reports@mydentalbackup.co.uk')
|
return $this->from('reports@mydentalbackup.co.uk')
|
||||||
->cc('reports@mydentalbackup.co.uk')
|
->cc($this->client->email ?: [])
|
||||||
->subject('Backup ( ' . $this->backup->schedule_name . ' ) Error! for : ' . $this->client->client_name)
|
->subject('Backup ( ' . $this->backup->schedule_name . ' ) Error! for : ' . $this->client->client_name)
|
||||||
->markdown('mail.backup.error', ['backup' => $this->backup]);
|
->markdown('mail.backup.error', ['backup' => $this->backup]);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -29,9 +29,9 @@ class BackupSuccess extends Mailable
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function build()
|
public function build()
|
||||||
{
|
{
|
||||||
return $this->from('reports@mydentalbackup.co.uk')
|
return $this->from('reports@mydentalbackup.co.uk')
|
||||||
->cc('reports@mydentalbackup.co.uk')
|
->cc($this->client->email ?: [])
|
||||||
->subject('Backup ( ' . $this->backup->schedule_name . ' ) Success! for : ' . $this->client->client_name . '')
|
->subject('Backup ( ' . $this->backup->schedule_name . ' ) Success! for : ' . $this->client->client_name . '')
|
||||||
->markdown('mail.backup.success', ['backup' => $this->backup]);
|
->markdown('mail.backup.success', ['backup' => $this->backup]);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ class BackupWarning extends Mailable
|
||||||
public function build()
|
public function build()
|
||||||
{
|
{
|
||||||
return $this->from('reports@mydentalbackup.co.uk')
|
return $this->from('reports@mydentalbackup.co.uk')
|
||||||
->cc('reports@mydentalbackup.co.uk')
|
->cc($this->client->email ?: [])
|
||||||
->subject('Backup ( ' . $this->backup->schedule_name . ' ) Warning! for : ' . $this->client->client_name . '')
|
->subject('Backup ( ' . $this->backup->schedule_name . ' ) Warning! for : ' . $this->client->client_name . '')
|
||||||
->markdown('mail.backup.warning', ['backup' => $this->backup]);
|
->markdown('mail.backup.warning', ['backup' => $this->backup]);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,8 @@ Contact us.
|
||||||
| :------------ | --------:|
|
| :------------ | --------:|
|
||||||
| Number of added files | {{$backup->added_files}} |
|
| Number of added files | {{$backup->added_files}} |
|
||||||
| Size of added files | {{$backup->size_of_added_files}} |
|
| Size of added files | {{$backup->size_of_added_files}} |
|
||||||
|
| Number of modified files | {{$backup->modified_files}} |
|
||||||
|
| Size of modified files | {{$backup->size_of_modified_files}} |
|
||||||
| Backup started | {{$backup->started_at}} |
|
| Backup started | {{$backup->started_at}} |
|
||||||
| Backup finished | {{$backup->finished_at}} |
|
| Backup finished | {{$backup->finished_at}} |
|
||||||
| Total backup time | {{$backup->duration}} |
|
| Total backup time | {{$backup->duration}} |
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,8 @@ Contact us.
|
||||||
| :------------ | --------:|
|
| :------------ | --------:|
|
||||||
| Number of added files | {{$backup->added_files}} |
|
| Number of added files | {{$backup->added_files}} |
|
||||||
| Size of added files | {{$backup->size_of_added_files}} |
|
| Size of added files | {{$backup->size_of_added_files}} |
|
||||||
|
| Number of modified files | {{$backup->modified_files}} |
|
||||||
|
| Size of modified files | {{$backup->size_of_modified_files}} |
|
||||||
| Backup started | {{$backup->started_at}} |
|
| Backup started | {{$backup->started_at}} |
|
||||||
| Backup finished | {{$backup->finished_at}} |
|
| Backup finished | {{$backup->finished_at}} |
|
||||||
| Total backup time | {{$backup->duration}} |
|
| Total backup time | {{$backup->duration}} |
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,8 @@ Contact us.
|
||||||
| :------------ | --------:|
|
| :------------ | --------:|
|
||||||
| Number of added files | {{$backup->added_files}} |
|
| Number of added files | {{$backup->added_files}} |
|
||||||
| Size of added files | {{$backup->size_of_added_files}} |
|
| Size of added files | {{$backup->size_of_added_files}} |
|
||||||
|
| Number of modified files | {{$backup->modified_files}} |
|
||||||
|
| Size of modified files | {{$backup->size_of_modified_files}} |
|
||||||
| Backup started | {{$backup->started_at}} |
|
| Backup started | {{$backup->started_at}} |
|
||||||
| Backup finished | {{$backup->finished_at}} |
|
| Backup finished | {{$backup->finished_at}} |
|
||||||
| Total backup time | {{$backup->duration}} |
|
| Total backup time | {{$backup->duration}} |
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue