Fix unsubscribe link. Closes #697
This commit is contained in:
@@ -69,12 +69,13 @@ class SendIncidentEmailNotificationHandler
|
||||
|
||||
foreach ($this->subscriber->all() as $subscriber) {
|
||||
$mail = [
|
||||
'email' => $subscriber->email,
|
||||
'subject' => 'New incident reported.',
|
||||
'status' => $data->humanStatus,
|
||||
'htmlContent' => $data->formattedMessage,
|
||||
'textContent' => $data->message,
|
||||
'token' => $subscriber->token,
|
||||
'email' => $subscriber->email,
|
||||
'subject' => 'New incident reported.',
|
||||
'status' => $data->humanStatus,
|
||||
'htmlContent' => $data->formattedMessage,
|
||||
'textContent' => $data->message,
|
||||
'token' => $subscriber->token,
|
||||
'unsubscribeLink' => route('unsubscribe', $subscriber->token),
|
||||
];
|
||||
|
||||
$this->mailer->queue([
|
||||
|
||||
@@ -69,12 +69,13 @@ class SendMaintenanceEmailNotificationHandler
|
||||
|
||||
foreach ($this->subscriber->all() as $subscriber) {
|
||||
$mail = [
|
||||
'email' => $subscriber->email,
|
||||
'subject' => 'Scheduled maintenance.',
|
||||
'status' => $data->humanStatus,
|
||||
'htmlContent' => $data->formattedMessage,
|
||||
'textContent' => $data->message,
|
||||
'token' => $subscriber->token,
|
||||
'email' => $subscriber->email,
|
||||
'subject' => 'Scheduled maintenance.',
|
||||
'status' => $data->humanStatus,
|
||||
'htmlContent' => $data->formattedMessage,
|
||||
'textContent' => $data->message,
|
||||
'token' => $subscriber->token,
|
||||
'unsubscribeLink' => route('unsubscribe', $subscriber->token),
|
||||
];
|
||||
|
||||
$this->mailer->queue([
|
||||
|
||||
@@ -19,6 +19,6 @@
|
||||
<p>{!! trans('cachet.powered_by', ['app' => Setting::get('app_name')]) !!}</p>
|
||||
@endif
|
||||
<p>
|
||||
<small><a href="{{ route('unsubscribe', $token) }}">{!! trans('cachet.subscriber.email.unsuscribe') !!}</a></small>
|
||||
<small><a href="{{ $unsubscribeLink }}">{!! trans('cachet.subscriber.email.unsuscribe') !!}</a></small>
|
||||
</p>
|
||||
@stop
|
||||
|
||||
@@ -19,6 +19,6 @@
|
||||
<p>{!! trans('cachet.powered_by', ['app' => Setting::get('app_name')]) !!}</p>
|
||||
@endif
|
||||
<p>
|
||||
<small><a href="{{ route('unsubscribe', $token) }}">{!! trans('cachet.subscriber.email.unsuscribe') !!}</a></small>
|
||||
<small><a href="{{ $unsubscribeLink }}">{!! trans('cachet.subscriber.email.unsuscribe') !!}</a></small>
|
||||
</p>
|
||||
@stop
|
||||
|
||||
Reference in New Issue
Block a user