diff --git a/app/Notifications/Component/ComponentStatusChangedNotification.php b/app/Notifications/Component/ComponentStatusChangedNotification.php
index 67c1f04aa015..8621e6f7902d 100644
--- a/app/Notifications/Component/ComponentStatusChangedNotification.php
+++ b/app/Notifications/Component/ComponentStatusChangedNotification.php
@@ -84,12 +84,15 @@ public function toMail($notifiable)
]);
return (new MailMessage())
- ->subject(trans('notifications.component.status_update.mail.subject'))
- ->greeting(trans('notifications.component.status_update.mail.subject'))
- ->line($content)
- ->action(trans('notifications.component.status_update.mail.action'), cachet_route('status-page'))
- ->line(trans('cachet.subscriber.unsubscribe', ['link' => cachet_route('subscribe.unsubscribe', $notifiable->verify_code)]))
- ->line(trans('cachet.subscriber.manage.manage_at_link', ['link' => cachet_route('subscribe.manage', $notifiable->verify_code)]));
+ ->subject(trans('notifications.component.status_update.mail.subject'))
+ ->markdown('notifications.component.update', [
+ 'componentName' => $this->component->name,
+ 'content' => $content,
+ 'unsubscribeText' => trans('cachet.subscriber.unsubscribe'),
+ 'unsubscribeUrl' => cachet_route('subscribe.unsubscribe', $notifiable->verify_code),
+ 'manageSubscriptionText' => trans('cachet.subscriber.manage_subscription'),
+ 'manageSubscriptionUrl' => cachet_route('subscribe.manage', $notifiable->verify_code),
+ ]);
}
/**
diff --git a/app/Notifications/IncidentUpdate/IncidentUpdatedNotification.php b/app/Notifications/IncidentUpdate/IncidentUpdatedNotification.php
index d5bca3f2ae3d..907ae366d059 100644
--- a/app/Notifications/IncidentUpdate/IncidentUpdatedNotification.php
+++ b/app/Notifications/IncidentUpdate/IncidentUpdatedNotification.php
@@ -75,16 +75,19 @@ public function toMail($notifiable)
]);
return (new MailMessage())
- ->subject(trans('notifications.incident.update.mail.subject'))
- ->greeting(trans('notifications.incident.update.mail.title', [
- 'name' => $this->update->incident->name,
- 'new_status' => $this->update->human_status,
- ]))
- ->line($content)
- ->action(trans('notifications.incident.update.mail.action'), cachet_route('incident', [$this->update->incident]))
- ->line($this->update->raw_message)
- ->line(trans('cachet.subscriber.unsubscribe', ['link' => cachet_route('subscribe.unsubscribe', $notifiable->verify_code)]))
- ->line(trans('cachet.subscriber.manage.manage_at_link', ['link' => cachet_route('subscribe.manage', $notifiable->verify_code)]));
+ ->subject(trans('notifications.incident.update.mail.subject'))
+ ->markdown('notifications.incident.update', [
+ 'incident' => $this->update->incident,
+ 'content' => $content,
+ 'actionText' => trans('notifications.incident.new.mail.action'),
+ 'actionUrl' => cachet_route('incident', [$this->update->incident]),
+ 'incidentName' => $this->update->incident->name,
+ 'newStatus' => $this->update->human_status,
+ 'unsubscribeText' => trans('cachet.subscriber.unsubscribe'),
+ 'unsubscribeUrl' => cachet_route('subscribe.unsubscribe', $notifiable->verify_code),
+ 'manageSubscriptionText' => trans('cachet.subscriber.manage_subscription'),
+ 'manageSubscriptionUrl' => cachet_route('subscribe.manage', $notifiable->verify_code),
+ ]);
}
/**
diff --git a/app/Notifications/Schedule/NewScheduleNotification.php b/app/Notifications/Schedule/NewScheduleNotification.php
index fa7bfd98adc0..dd93398aea23 100644
--- a/app/Notifications/Schedule/NewScheduleNotification.php
+++ b/app/Notifications/Schedule/NewScheduleNotification.php
@@ -74,11 +74,14 @@ public function toMail($notifiable)
]);
return (new MailMessage())
- ->subject(trans('notifications.schedule.new.mail.subject'))
- ->greeting(trans('notifications.schedule.new.mail.title'))
- ->line($content)
- ->action(trans('notifications.schedule.new.mail.action'), cachet_route('schedule', [$this->schedule]))
- ->line(trans('cachet.subscriber.unsubscribe', ['link' => cachet_route('subscribe.unsubscribe', $notifiable->verify_code)]));
+ ->subject(trans('notifications.schedule.new.mail.subject'))
+ ->markdown('notifications.schedule.new', [
+ 'content' => $content,
+ 'unsubscribeText' => trans('cachet.subscriber.unsubscribe'),
+ 'unsubscribeUrl' => cachet_route('subscribe.unsubscribe', $notifiable->verify_code),
+ 'manageSubscriptionText' => trans('cachet.subscriber.manage_subscription'),
+ 'manageSubscriptionUrl' => cachet_route('subscribe.manage', $notifiable->verify_code),
+ ]);
}
/**
diff --git a/resources/views/notifications/component/update.blade.php b/resources/views/notifications/component/update.blade.php
new file mode 100644
index 000000000000..5aea67bdaeb0
--- /dev/null
+++ b/resources/views/notifications/component/update.blade.php
@@ -0,0 +1,11 @@
+@component('mail::message')
+# {{ trans('notifications.component.status_update.mail.greeting') }}
+
+{{ $content }}
+
+Thanks,
+{{ Config::get('setting.app_name') }}
+
+@include('notifications.partials.subscription')
+
+@endcomponent
\ No newline at end of file
diff --git a/resources/views/notifications/incident/update.blade.php b/resources/views/notifications/incident/update.blade.php
new file mode 100644
index 000000000000..7817d4c8639c
--- /dev/null
+++ b/resources/views/notifications/incident/update.blade.php
@@ -0,0 +1,11 @@
+@component('mail::message')
+# {{ trans('notifications.incident.update.mail.title', ['name' => $incidentName, 'new_status' => $newStatus]) }}
+
+{{ $content }}
+
+Thanks,
+{{ Config::get('setting.app_name') }}
+
+@include('notifications.partials.subscription')
+
+@endcomponent
\ No newline at end of file
diff --git a/resources/views/notifications/schedule/new.blade.php b/resources/views/notifications/schedule/new.blade.php
new file mode 100644
index 000000000000..d58d10a2ee80
--- /dev/null
+++ b/resources/views/notifications/schedule/new.blade.php
@@ -0,0 +1,11 @@
+@component('mail::message')
+# {{ trans('notifications.schedule.new.mail.title') }}
+
+{{ $content }}
+
+Thanks,
+{{ Config::get('setting.app_name') }}
+
+@include('notifications.partials.subscription')
+
+@endcomponent
\ No newline at end of file