Skip to content

Commit cb93acc

Browse files
committed
Update error email
1 parent cb058e8 commit cb93acc

2 files changed

Lines changed: 13 additions & 5 deletions

File tree

‎ProcessMaker/Notifications/ErrorExecutionNotification.php‎

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ class ErrorExecutionNotification extends Notification
1414
use Queueable;
1515

1616
private $tokenInterface;
17+
1718
private $message;
19+
1820
private $errorHandling;
1921

2022
/**
@@ -45,6 +47,7 @@ public function via($notifiable)
4547
if ($this->errorHandling['email_notification'] === true) {
4648
$via[] = 'mail';
4749
}
50+
4851
return $via;
4952
}
5053

@@ -57,12 +60,15 @@ public function via($notifiable)
5760
public function toMail($notifiable)
5861
{
5962
$data = $this->toArray($notifiable);
63+
$title = __('Request # :id Execution Error', ['id' => $data['request_id']]);
64+
6065
return (new MailMessage)
6166
->error()
62-
->subject("Request {$data['request_id']} Execution Error ")
63-
->greeting("Request {$data['request_id']} Execution Error ")
67+
->subject($title)
68+
->greeting($title)
69+
->salutation($title)
6470
->line($data['message'])
65-
->action('Notification Action', url($data['url']))
71+
->action(__('View Request'), url($data['url']))
6672
->line($this->message);
6773
}
6874

@@ -111,4 +117,4 @@ public function toArray($notifiable)
111117
),
112118
];
113119
}
114-
}
120+
}

‎resources/lang/en.json‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1696,5 +1696,7 @@
16961696
"Script failed after :attempts total attempts": "Script failed after :attempts total attempts",
16971697
"Failed after :num total attempts": "Failed after :num total attempts",
16981698
"Seconds to wait before retrying. Leave empty to use script default. Set to 0 for no retry wait time.": "Seconds to wait before retrying. Leave empty to use script default. Set to 0 for no retry wait time.",
1699-
"Number of times to retry. Leave empty to use script default. Set to 0 for no retry attempts.": "Number of times to retry. Leave empty to use script default. Set to 0 for no retry attempts."
1699+
"Number of times to retry. Leave empty to use script default. Set to 0 for no retry attempts.": "Number of times to retry. Leave empty to use script default. Set to 0 for no retry attempts.",
1700+
"View Request": "View Request",
1701+
"Request # :id Execution Error": "Request # :id Execution Error"
17001702
}

0 commit comments

Comments
 (0)