Skip to content
Snippets Groups Projects
Commit 13c5009e authored by Thijs Kinkhorst's avatar Thijs Kinkhorst
Browse files

Show what went wrong when sending the email.

Since this is an admin screen, we can show the exception message
unconditionally.
parent 5f1884b2
No related branches found
No related tags found
No related merge requests found
......@@ -162,7 +162,7 @@ class Cron
$t->data['time'] = $time;
$t->data['url'] = $url;
$t->data['mail_required'] = isset($mail);
$t->data['mail_sent'] = !isset($e);
$t->data['mail_exception'] = $e ?? null;
$t->data['summary'] = $summary;
return $t;
}
......
......@@ -27,9 +27,11 @@ Tag: {{ tag }}
</code>
</div>
{% if mail_required == true and mail_sent == false %}
{% if mail_required == true and mail_exception %}
<div class="message-box error">
Cron-report was not emailed due to an error.
Cron-report was not emailed due to an error:
<pre>{{ mail_exception.getMessage() }}</pre>
</div>
{% endif %}
{% endblock %}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment