
Sendex
Email newsletters in MODX — subscribers, send queue, and a front-end subscribe form


Step-by-step setup for your first Sendex newsletter.
| Field | Description |
|---|---|
| Name | Newsletter name in the manager |
| Template | MODX template for the letter body (see step 3) |
| Email subject | Outgoing subject line |
| From email | Sender address |
| Reply-to email | Reply-To header |
| Sender name | Display name |
| Enabled | Whether the newsletter is active |
More on fields and subscribers: Subscriptions.
Create a MODX template for the letter body. On send, Sendex passes newsletter, subscriber, and for logged-in subscribers — user and profile.
Unsubscribe link example:
{set $args = [
'sx_action' => 'unsubscribe',
'newsletter_id' => $newsletter.id,
'code' => $subscriber.code,
]}
<a href="{'site_start' | option | url : ['scheme' => 'full'] : $args}">Unsubscribe from this newsletter</a><a href="[[~[[++site_start]]?scheme=`full`&sx_action=`unsubscribe`&newsletter_id=`[[+newsletter.id]]`&code=`[[+subscriber.code]]`]]">
Unsubscribe from this newsletter
</a>The target page must call the Sendex snippet:
{'!Sendex' | snippet : ['id' => 1]}[[!Sendex? &id=`1`]]Full placeholder list: snippet docs.
Demo template from package
Transport includes template Sendex (template.sendex.tpl) with all newsletter, subscriber, user, profile placeholders and an unsubscribe link example. Use it as a starting point.
Call the snippet uncached — output depends on login state:
{'!Sendex' | snippet : ['id' => 1]}[[!Sendex? &id=`1`]]Replace 1 with your newsletter ID.
sendex_confirm_email, default Yes) they receive an activation link[[!Sendex]]core/components/sendex/cron/send.php (if queue >100 emails)sxOn* events visible after package upgrade (see Events)