#5064 "Notifications that arrive": - render_webhook: alert.* is escaped to sit inside a JSON string (a quote or newline in a rule name no longer breaks the body); raw.* is the plain value for |tojson; a missing value reads "no data"; the template runs sandboxed and the body is checked to be JSON before it is sent. - SMTP: 15s timeout; port 465 connects with implicit TLS, otherwise the box means STARTTLS; a From address setting (falls back to the username). - A webhook error no longer carries the URL, which is a secret. - Settings → Notifications: "Send a test email" / "Send a test webhook" send a sample alert with the form's values (unsaved) and show the result and the body that went out; template help names alert.* and raw.*. - Notification audits go through audit_request; the test send is audited as settings.notification.tested, with the channel and outcome only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
9 lines
481 B
HTML
9 lines
481 B
HTML
{# settings/_notify_test.html — result of a test send from Settings → Notifications #}
|
|
<div class="alert {% if ok %}alert-success{% else %}alert-error{% endif %}" style="margin:0.75rem 0 0;">
|
|
{{ result }}
|
|
</div>
|
|
{% if payload %}
|
|
<p style="font-size:0.75rem;color:var(--text-muted);margin:0.5rem 0 0.2rem;">What was sent:</p>
|
|
<pre style="font-family:ui-monospace,monospace;font-size:0.8rem;white-space:pre-wrap;word-break:break-word;margin:0;">{{ payload }}</pre>
|
|
{% endif %}
|