Queues emails by the rules of your own event — for events that are not among the system ones. Call it uncached.
[[!vestnik_notify? &event=`order.paid` &email=`[[+email]]` &data=`{"order_id":"105","fullname":"John"}`]]
| Parameter | Description |
|---|---|
&event | Event key, required. Any name (order.paid, feedback.sent) — it must match the “Event key” of an active rule. |
&email | Recipient address for the “Event user” strategy (stored in the data as email). |
&data | JSON with template data: each key becomes a [[+key]] placeholder. |
&source | manual (default) or component — a label for OnVestnikBeforeQueue and the debug log. |
&showCount | 1 — output the number of queued emails. By default the snippet outputs nothing. |
The event name does nothing by itself: first create a rule with this key, a template and a recipient, then call the snippet.
Attachments cannot be passed through the snippet: the attachments key in &data is skipped (with a warning in the log) — a visitor could otherwise pass a path to a server file. Attachments only from code, see Attachments.
If the JSON in &data is invalid, no email is created and the reason is written to the MODX error log.